sentry auth token should be obscure which is currently visible to all project maintainers
The Sentry authentication token stored in GitLab's operations settings was visible to all project maintainers, not just the one who entered it. A maintainer could use this token to connect to Sentry and access projects they might not otherwise have permission to view, even after being demoted.
GitLab
Originally disclosed on GitLab
- Fixed in 3 months
- Disclosed after 3 months
HackerOne report #637252 by ashish_r_padelkar on 2019-07-07, assigned to estrike:
Summary
Hello,
The sentry auth token at /-/settings/operations in Error tracking should be obscure as it is visible for other project maintainers.
Currently all the project maintainers can see the auth token directly which allows any maintainer to connect the sentry url repeatedly and fetch the sentry projects which they mightnot have access otherwise.
Also, if maintainer is demoted/removed from project, they will still have access to auth token and can fetch the projects from sentry unless auth token is explicitly removed from sentry side.
The better approach would be to obscure the token and ask maintainers to input it every time they connect instead of saving it in the text box.
Steps to reproduce
- Maintainer1 puts the auth token of sentry at
/-/settings/operationsand fetches the projects and saves it. - Maintainer2 can see the auth token from
/-/settings/operationsand uses the same token to connect again and see the projects which they might not have access in sentry. - Maintainer2 is demoted to reporter role but still able to fetch the sentry projects unless auth token is removed from sentry side.
What is the current bug behavior?
Sentry auth token is visible for all maintainers
What is the expected correct behavior?
Auth token should be obscure and should be entered each time they connect to sentry
Output of checks
This bug happens on GitLab.com
Regards,
Ashish
Impact
Sentry Auth Token is visible to all maintainers of the projects
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 application stored the Sentry authentication token in plain text and displayed it to all users with maintainer role, without restricting access to the user who configured it.
Impact
Any project maintainer could view the Sentry auth token and use it to access Sentry projects they might not have permission to see, even after being demoted, until the token is revoked in Sentry.
What the attacker needed
Access to a GitLab project as maintainer; Sentry integration configured with an auth token
The fix
The token should be obscured and maintainers should be required to enter it each time they connect to Sentry.
How it was found
- Maintainer1 enters the Sentry auth token in the operations settings and saves it.
- Maintainer2 views the same settings page and sees the token.
- Maintainer2 uses the token to connect to Sentry and access projects they might not have permission to view.
- Maintainer2 is demoted to reporter but can still use the token to fetch Sentry projects until the token is removed from Sentry.
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.
An authentication token is like a password that lets a service talk to another service. Here, GitLab saved a token for connecting to Sentry (an error tracking service) in a settings page, and every project maintainer could see it. That meant someone with lower permissions could use the token to reach Sentry data they shouldn't see.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.