SSRF 2.0: Bypassing Internal Protections via Redirect Loops
The text describes a technique where an SSRF endpoint that follows redirects is pointed at a self-redirecting URL, causing a loop that may leak internal IP addresses via headers. Attackers could then use the leaked information to brute-force internal services.
Published on medium.com
Server-Side Request Forgery (SSRF) remains a highly exploitable and impactful vulnerability in modern web applications. In this post, we dive into a novel SSRF technique involving redirect loops, which was discovered by researchers at Assetnote.
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 SSRF endpoint follows HTTP redirects without restricting the final destination, and intermediate redirects can leak internal information via headers.
Impact
Under some configurations, an attacker could leak internal IP addresses and use that information to brute-force internal services.
What the attacker needed
SSRF endpoint that follows redirects; attacker-controlled redirect server
The fix
SSRF-prone endpoints should limit and sanitize redirection behaviour, for example by disabling redirects or setting tight limits.
How it was found
- Host an endpoint that responds with an HTTP redirect to itself.
- Make the vulnerable SSRF endpoint fetch the redirecting URL.
- Observe the redirect loop and any leaked headers.
- Use leaked information to brute-force internal applications.
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.
Server-Side Request Forgery (SSRF) is when a server can be tricked into making requests to places the attacker cannot reach directly, like internal systems. This post suggests that if the server follows redirects, an attacker can make it loop and possibly reveal internal network details through headers.
What is SSRF?
The server can be made to fetch an address the attacker chooses, reaching internal services, cloud metadata or other customers' data.