[Server Side Request Forgery] Blind SSRF due to Sentry Misconfiguration
The Sentry error reporting configuration had the 'Scrap Source Code' feature enabled, which caused the site to make blind GET requests to a user-controlled filename parameter. An attacker could exploit this to perform blind SSRF, as demonstrated by receiving a callback on their own server.
Published on web.archive.org
Bug Bounty Writeup Web
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 the Sentry 'Scrap Source Code' feature was enabled, allowing the filename parameter to be used to make requests to arbitrary external servers.
Impact
An attacker could cause the server to make blind GET requests to arbitrary external servers, potentially used for reconnaissance or to interact with internal services, though the response is not visible to the attacker.
What the attacker needed
Sentry with 'Scrap Source Code' enabled; Ability to trigger an error with a controlled filename
The fix
The 'Scrap Source Code' feature should be disabled in Sentry to prevent the filename parameter from being used for SSRF.
How it was found
- Intercept all requests and responses using BurpSuite.
- Search for the keyword 'sentry' using filters in BurpSuite.
- Look for a 'filename' parameter in a Sentry request or response.
- Change the value of the 'filename' parameter to your own server address.
- Wait for the response; a callback will be received on your server.
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.
Sentry is a tool that helps developers track errors. When 'Scrap Source Code' is on, Sentry tries to fetch the source code file mentioned in an error. The filename in the error can be controlled by an attacker, so Sentry ends up making requests to any server the attacker chooses, which is a blind SSRF (the attacker cannot see the response but can detect the request).
What is SSRF?
The server can be made to fetch an address the attacker chooses, reaching internal services, cloud metadata or other customers' data.