Skip to content
Info disclosure Disclosed report Intermediate

Maintainer can leak sentry token by changing the configured URL (fix bypass)

The patch that prevented leaking a Sentry token when changing the Sentry URL used a prefix check that could be bypassed by registering a domain that is a prefix of the original. A maintainer could change the URL to such a domain and click connect, causing the old token to be sent to the attacker's server.

70rpedo Follow

Originally disclosed on HackerOne

Medium 5.5 View original
  • Triaged in 6 days
  • Fixed in 46 days
  • Paid in 6 days
  • Disclosed after 14 months

Summary by the program

A malicious Maintainer can, under specific circumstances, leak the sentry token by changing the configured URL in the Sentry error tracking settings page. This was as a result of an incomplete fix for CVE-2022-4365.

The original report as published on HackerOne, by 70rpedo. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

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 URL change check used a simple string prefix comparison, which does not ensure the new host is a subdomain or same origin, allowing a malicious domain that is a prefix of the original to pass.

Impact

A maintainer could leak the configured Sentry token, gaining read and write access to the Sentry instance.

What the attacker needed

Two GitLab accounts; attacker must be a maintainer; attacker controls a domain that is a prefix of the original

The fix

Changing the URL should require adding a new token, even for connect requests.

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.

When you connect GitLab to an external service like Sentry, you provide a secret token. GitLab tries to prevent leaking that token if someone changes the server address. The fix checked only if the new address started with the old one, so an attacker could use a similar-looking domain to trick GitLab into sending the token.

What is Info disclosure?

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.

More from GitLab

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Information disclosure

The lesson behind this report.

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.