Denial-of-Service via /-/edit/ endpoint loading full blob into memory
The /-/edit/ endpoint loads the entire file blob into memory on each request, so an attacker can upload a very large file and repeatedly request the edit page to exhaust server memory and crash workers. This causes a denial of service for all users on the instance.
GitLab
Originally disclosed on GitLab
- Fixed in 2 months
- Disclosed after 2 months
⚠️ Please read the process on how to fix security issues before starting to work on the issue. Vulnerabilities must be fixed in a security mirror.
HackerOne report #3161756 by pwnie on 2025-05-25, assigned to @fvpotvin:
Report | How To Reproduce
Report
Summary
/-/edit/<branch>/<file> streams the entire blob into memory on every request. An attacker can upload a very large file (≥ 1 GB) and repeatedly hit this endpoint to exhaust RAM/CPU, forcing Puma workers to crash-loop.
Steps to Reproduce
- Upload a large file (e.g., 3 GB) to any repository you control.
- Run a parallel flood (100 requests, 20 concurrent):
seq 100 | xargs -P20 -n1 -I{} \
curl 'https://<gitlab-host>/<namespace>/<repo>/-/edit/main/a_1GB.bin?ref_type=heads' \
-b '_gitlab_session=<valid_session_cookie>' \
--insecure
- Watch server memory spike → OOM → worker restarts → site outage.
Impact
Any authenticated user with Developer-level (write) access can repeatedly crash all web workers, causing a persistent DoS for every GitLab user on the instance (GitLab.com included, since free personal projects are allowed).
Impact
Any authenticated user with Developer-level (write) access can repeatedly crash all web workers, causing a persistent DoS for every GitLab user on the instance (GitLab.com included, since free personal projects are allowed).
How To Reproduce
Please add reproducibility information to this section:
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the edit endpoint reads the entire blob into memory without any size limit or streaming, so large files cause memory exhaustion.
Impact
Any authenticated user with Developer-level access could repeatedly crash all web workers, causing a persistent denial of service for every GitLab user on the instance, including GitLab.com.
What the attacker needed
Authenticated user with Developer-level access; ability to upload a large file to a repository
How it was found
- Upload a large file (e.g., 3 GB) to a repository you control.
- Send many concurrent requests to the edit endpoint for that file.
- Observe server memory spike, out-of-memory, worker restarts, and site outage.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
When you open a file for editing on a website, the server usually reads the whole file into its memory first. If the file is huge and many people ask for it at once, the server runs out of memory and crashes. Here, an attacker with a normal account can upload a giant file and then flood the edit page to take the whole site down.
What is DoS?
A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.