Enumeration of Email address, Username. and Full Name using Group SAML External ID
The SCIM user creation endpoint returned the first user ever created with a given external ID, regardless of which group that user belonged to. An attacker holding a SCIM token could therefore look up the email address, username and full name of users in other groups by guessing external IDs.
GitLab
Originally disclosed on GitLab
- Fixed in 15 months
- Disclosed after 15 months
HackerOne report #567781 by ngalog on 2019-05-06, assigned to hackerjuan:
Summary
SCIM user creation always return the first user created with that external id, allowing attacker to enumerate email address/username/full name with external id of group saml.
Steps to reproduce
- Get SCIM token as documented in this (page)[https://docs.gitlab.com/ee/api/scim.html]
- Issue this request
POST /api/scim/v2/groups/YOUR_GROUP_PATH/Users HTTP/1.1
Host: gitlab.com
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:66.0) Gecko/20100101 Firefox/66.0
Accept: application/json, text/plain, */*
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
content-type: application/scim+json
authorization: bearer YOUR_SCIM_TOKEN
Connection: close
Content-Length: 312
[REDACTED]
Then you should see
[REDACTED]
- This means you now can enumerate the external_id
adminto other group's user's email/username/full name
Why
I think because the SQL query always return the first user with that external id, so in this bug it always return the first user ever created with the external id, regardless what group does the user belongs
nfo RAILS_ENV=production`)
PS
If the API request has any errors, please fix as instructed, like changing the email address to a new one, it's just some dummy data
Impact
Enumeration of Email address, Username. and Full Name using Group SAML External ID
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 SCIM lookup query matched on external ID alone and returned the first matching user without scoping the search to the requesting group.
What the attacker needed
A SCIM token for a group; knowledge or guessing of external IDs
How it was found
- Obtain a SCIM token for a group as described in the GitLab SCIM documentation.
- Send a SCIM user creation request to the group's Users endpoint with the token.
- Observe that the response returns an existing user's details rather than creating a new one.
- Use this to enumerate external IDs and read other groups' users' email, username and full name.
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.
SCIM is a standard way for companies to automatically create and manage user accounts in a service. Each user can carry an external ID, a label set by the company's identity system. Here the service looked up users by that label without checking which group they belonged to, so someone with a management token could learn details about users in other groups.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.