DoS via GraphQL Blob type not using Workhorse
The GitLab GraphQL API allows fetching large repository blobs directly via the plainData field, bypassing Workhorse and Gitaly timeouts. An attacker can repeatedly request multiple large files to cause excessive resource consumption, leading to denial of service.
GitLab
Originally disclosed on GitLab
- Fixed in 34 days
- Disclosed after 34 days
⚠️ 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 #3026555 by pwnie on 2025-03-08, assigned to @gandrews7:
Report | How To Reproduce
Report
Summary
An unprotected GraphQL endpoint in GitLab allows direct access to large repository blobs (via the plainData field), bypassing normal Workhorse/Gitaly timeouts. By repeatedly fetching multiple large files, an attacker can trigger excessive resource consumption, leading to a denial-of-service.
Steps to Reproduce
- Upload large files
- Commit three ~300MB files of random (e.g., Base64) data to your GitLab repository (not via LFS).
- Construct GraphQL query
- Fetch these large files using the
plainDatafield:Bash curl 'http://<HOSTNAME>/api/graphql' \ -H 'Content-Type: application/json' \ --data-raw '{ "variables": {}, "query": "query { project(fullPath: \"<PROJECT_PATH>\") { repository { blobs(paths: [\"<LARGE_FILE1>\", \"<LARGE_FILE2>\", \"<LARGE_FILE3>\"], ref: \"main\") { nodes { path webPath plainData } } } } }" }' - Replace
<HOSTNAME>,<PROJECT_PATH>, and filenames accordingly.
- Fetch these large files using the
- Send repeated requests
- Loop the above request multiple times (possibly in parallel) to simulate an attack.
- Observe resource usage
- Monitor server metrics; repeated queries for large blobs quickly spike memory/CPU usage, potentially causing crashes or severe degradation.
Impact
- Denial-of-Service (DoS): Flooding the GraphQL endpoint with requests to large blobs consumes excessive resources, making the GitLab instance unresponsive or severely degraded.
- Minimal Access Requirements: Only knowledge of the target project path and blob paths is required; no special permissions are needed.
Components Affected
- The GitLab GraphQL API endpoint that returns large blob content (
plainData) directly via Rails, bypassing Workhorse and Gitaly timeout protections.
Impact
- Denial-of-Service (DoS): Flooding the GraphQL endpoint with requests to large blobs consumes excessive resources, making the GitLab instance unresponsive or severely degraded.
- Minimal Access Requirements: Only knowledge of the target project path and blob paths is required; no special permissions are needed.
Impact
- Denial-of-Service (DoS): Flooding the GraphQL endpoint with requests to large blobs consumes excessive resources, making the GitLab instance unresponsive or severely degraded.
- Minimal Access Requirements: Only knowledge of the target project path and blob paths is required; no special permissions are needed.
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 GraphQL plainData field fetches blob content directly in Rails without the resource limits and timeouts enforced by Workhorse and Gitaly.
Impact
Repeated queries for large blobs could consume excessive resources, making the GitLab instance unresponsive or severely degraded.
What the attacker needed
Knowledge of target project path and blob paths; no special permissions needed
How it was found
- Commit three large files of random data to a GitLab repository.
- Construct a GraphQL query that requests the plainData field for those large files.
- Send the query repeatedly, possibly in parallel, to simulate an attack.
- Monitor server metrics to observe memory and CPU spikes.
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.
GitLab has a feature that lets you read file contents through its GraphQL API. Normally, large file reads go through a protective service that limits time and resources, but this API skips that protection. By asking for several very large files over and over, an attacker can overload the server and make it slow or crash for everyone.
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.