Exploiting SSRF via Cloudflare Image Proxy on [REDACTED]
The Cloudflare image proxy endpoint accepted fully qualified external URLs, causing the server to fetch arbitrary remote content. An attacker could use this to make requests to internal services or cloud metadata endpoints, though the vendor considered it a known accepted risk.
medium.com
Published on medium.com
While investigating subdomains of [REDACTED], I uncovered a Server-Side Request Forgery (SSRF) vulnerability that was exposed through a Cloudflare-managed image optimization endpoint. Specifically, the endpoint at /cdn-cgi/image/ allowed full external URLs to be passed as parameters—enabling an attacker to force…
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 image proxy did not validate or restrict the URLs it fetched, allowing absolute external URLs to be passed as parameters.
Impact
The SSRF could allow internal service scanning, cloud metadata exfiltration, bypassing IP-based firewalls, and potentially stored XSS via malicious SVGs, though the vendor considered it a known accepted risk.
What the attacker needed
None
The fix
The image proxy should only allow relative paths or use an allowlist of permitted domains, and disable SVG rendering by default.
How it was found
- Enumerate subdomains and identify the Cloudflare image proxy endpoint.
- Set up an out-of-band interaction server to log requests.
- Craft a request to the image proxy with an external URL pointing to the interaction server.
- Observe incoming HTTP requests from Cloudflare IP addresses, 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.
Server-Side Request Forgery (SSRF) is when a server is tricked into making requests to places the attacker cannot reach directly. Here, an image resizing service fetched any URL given to it, so an attacker could use it to probe internal networks or cloud metadata services.
What is SSRF?
The server can be made to fetch an address the attacker chooses, reaching internal services, cloud metadata or other customers' data.