Skip to content
SSRF Write-up Intermediate

SSRF Vulnerability due to Sentry misconfiguration

A Sentry configuration allowed JavaScript source fetching, which could be abused to make the server request an attacker-controlled URL. The author demonstrated this by changing the source URL to an ngrok tunnel and logging the incoming request, confirming SSRF.

medium.com

Published on medium.com

That story happened when I saw that disclosed report.

Valeriy Shevchenko, on medium.com

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 instance had JavaScript source fetching enabled, allowing user-supplied source URLs to be fetched by the server without adequate restrictions.

Impact

An attacker could make the Sentry server send requests to arbitrary addresses, potentially accessing internal services or confirming SSRF, though the text does not detail further exploitation.

What the attacker needed

Sentry source fetching enabled; ability to trigger a Sentry error request; attacker-controlled server (e.g., ngrok)

The fix

The issue was reported and the author hoped it would be fixed by analysing all Sentry endpoints; the text does not confirm a fix.

How it was found

  1. Trigger an error in the target's browser to generate a request to Sentry containing error information.
  2. Capture the Sentry request in a proxy such as Burp Suite.
  3. Replace the source URL in the request with an attacker-controlled address (e.g., an ngrok tunnel).
  4. Send the modified request and observe the incoming request on the attacker's server, confirming SSRF.

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 an error-tracking service that can fetch the source code of JavaScript files to show better error reports. If that fetching feature is left on, an attacker can point it at their own server and make the target's Sentry instance send a request there, which is called server-side request forgery (SSRF). This lets the attacker confirm that the server can be tricked into making requests to arbitrary addresses.

What is SSRF?

The server can be made to fetch an address the attacker chooses, reaching internal services, cloud metadata or other customers' data.

Similar reports

View all

Same bug class and techniques, clearest first.

Server-side request forgery (SSRF)

The lesson behind this report.

The server can be made to fetch an address the attacker chooses, reaching internal services, cloud metadata or other customers' data.