CVE20214191: GitLab GraphQL API User Enumeration (FIXED)
The GitLab GraphQL API lacked an authentication check on certain queries, allowing a remote unauthenticated attacker to retrieve usernames, names, and sometimes email addresses of registered users. This information could be used to build username lists for brute-force or credential-stuffing attacks.
Published on rapid7.com
On February 25, 2022, GitLab published a fix for CVE-2021-4191, which is an instance of CWE-359, "Exposure of Private Personal Information to an Unauthorized Actor." The now-patched vulnerability affected GitLab versions since 13.0. The vulnerability is the result of a missing authentication check when executing…
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
Likely a missing authentication check on certain GraphQL queries allowed unauthenticated access to user data.
Impact
An unauthenticated attacker could collect usernames, names, and sometimes email addresses, which could be used for brute-force attacks, credential stuffing, or phishing.
What the attacker needed
Unauthenticated access to the GraphQL endpoint; GitLab version 13.0 or later
The fix
The vulnerability was fixed in GitLab versions 14.8.2, 14.7.4, and 14.6.5; additionally, disabling public profiles can mitigate information gathering.
How it was found
- Send a GraphQL query to the /api/graphql endpoint requesting user fields such as id, name, and username.
- Observe that the response contains user data without requiring authentication.
- Use pagination to retrieve all users.
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 is a tool for managing code. Its GraphQL API is a way for programs to ask the server for data. Normally, you need to log in to use it, but a mistake meant that anyone could ask for a list of all users without logging in. That list could then be used to guess passwords or send phishing emails.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.