Unauthenticated Gitlab SSRF
The GitLab CI Lint API accepted unauthenticated requests and processed remote YAML includes, allowing an attacker to make the server fetch arbitrary URLs. This could be used to access internal services such as Prometheus and retrieve their data.
A usual request to this API would validate YAML payload and provide the result accordingly.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
The CI Lint API allowed unauthenticated users to submit YAML with remote includes, and the server fetched those URLs without restricting internal addresses.
What the attacker needed
Internal network requests enabled; no authentication required
How it was found
- Send a POST request to the CI Lint API with a YAML content that includes a remote URL pointing to an internal service.
- Ensure the remote URL ends with .yml so the API accepts it for validation.
- Read the merged_yaml field in the response to obtain the fetched internal data.
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 write-up has not been written yet. The Original tab links to the source.
GitLab has an API endpoint that checks whether a CI/CD configuration file is valid. That endpoint did not require a login, and it could be told to fetch a remote YAML file from any URL, including internal addresses. An attacker could therefore use it to make GitLab's server request internal services and read their responses.
What is SSRF?
The server can be made to fetch an address the attacker chooses, reaching internal services, cloud metadata or other customers' data.