GitLab is a code hosting platform used by millions of developers and organizations. Its API includes a GraphQL endpoint at /api/graphql that supports a wide range of queries.
Security researcher Nir Ohfeld at Rapid7 discovered that a specific GraphQL query — one that enumerates all registered users, their usernames, and email addresses — required no authentication whatsoever. The endpoint itself was open to unauthenticated callers, and the user enumeration query was not restricted to admin-role tokens.
The query returned: username, name, email address, and user ID for every registered user on the instance. On GitLab.com, this meant the personal details of millions of users were enumerable without any login.
GitLab patched CVE-2021-4191 in GitLab versions 14.7.7, 14.8.5, and 14.9.2. The patch added authentication requirements to the affected GraphQL resolvers and restricted user enumeration to administrator-role tokens only. Self-hosted GitLab instances that had not updated remained exposed until patched.