Akamai WAF Bypass: Escalating SSRF into Internal Port Scanning
A download API that fetched user-supplied URLs was protected by Akamai, which blocked direct internal URL requests. By wrapping the internal URL in an external redirect, the attacker bypassed the WAF and could scan internal ports and access internal web applications.
medium.com
Published on medium.com
This issue came from an endpoint that looked completely harmless. It was a download API that fetched a URL on the server and returned the content.
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 backend followed redirects without validating the final destination, and the WAF only inspected the initial URL.
Impact
The attacker could bypass Akamai protections, scan internal ports, discover internal services, and access internal web applications, which could be chained with other bugs.
What the attacker needed
A download API that fetches URLs; Akamai WAF protecting the endpoint; Ability to host a redirect
The fix
The backend should validate the final destination URL after following redirects, not just the initial input.
How it was found
- Send a request to the download API with an external URL that redirects to an internal URL.
- Observe that the request passes through Akamai without being blocked.
- Change the internal port number in the redirect target to determine which ports are open.
- Point the redirect to a controlled domain to confirm the backend makes the request.
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.
A server-side request forgery (SSRF) bug lets an attacker make a server fetch a URL of their choosing, even internal ones. Here, the web application firewall (WAF) only checked the first URL, so the attacker used a redirect to reach internal services. This let them scan internal ports and see which services were running.
What is SSRF?
The server can be made to fetch an address the attacker chooses, reaching internal services, cloud metadata or other customers' data.