Skip to content
SSRF Disclosed report Beginner

Cloudflare /cdn-cgi/ path allows resizing images from unauthorised sources on enjinusercontent.com

A Cloudflare image-resizing endpoint on Enjin's content domain accepted arbitrary external URLs, so an attacker could make the site render images and other resources from any third-party CDN. The reporter claims this could enable HTML injection, SSRF-style port scanning, and virtual defacement or misinformation.

19whoami19 Follow

Originally disclosed on HackerOne

  • Triaged in under an hour
  • Fixed in under an hour
  • Disclosed after 8 days

Summary by the program

@19whoami19 identified that one of Enjin's websites (enjinusercontent.com) had a misconfiguration within Cloudflare, due to being on a legacy pricing model, which enabled resizing images outside of the domain for which the request was initiated. A toggle was introduced for users of the legacy pricing model which allowed disabling this functionality without direct engagement with Cloudflare. The functionality was disabled, cache was purged, and the issue confirmed as having been resolved.

The report

##Summary

Hello team, During a review of the website: https://nft.production.enjinusercontent.com/ I discovered that any resource hosted under any external CDN can be rendered on the website without any restrictions. This behavior leads display of images or resources on the website, which may cause confusion for users or expose potentially sensitive assets or otherwise deface the websites or carry our misinformation or malware campaigns.

  • You Achive :

1- HTML INJECTION 2- SSRF and Portal Scanning 3- Unrestricted rendering of resources from external CDNs

##Steps to Reproduce :

1- For HTMLi Visit : https://nft.production.enjinusercontent.com/cdn-cgi/image/width=1000,format=auto/https://raw.githubusercontent.com/simple-icons/simple-icons/develop/icons/cloudflare.svg

image.png
image.png From the original on HackerOne

Impact

Misuses of the cdn-cgi Misconfig to render external resources Access control Bypass by smuggling in external resources to render at the company url unrestricted Misinformation and platform manipulation for displayed content to any user without interaction Attacker can redirect users to another websites, virtual defacement of your website etc. Webpage modifications HTML Injection

The original report as published on HackerOne, by 19whoami19. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 4 min read.

Context

Enjin runs a set of content delivery hosts under enjinusercontent.com, and one of them, nft.production.enjinusercontent.com, sits behind Cloudflare. Cloudflare's image resizing feature is exposed through the /cdn-cgi/image/ path: a request to that path carries transformation options (width, format and so on) followed by the URL of the image to be fetched and resized, and Cloudflare returns the transformed image from the edge.

That feature is meant to serve images belonging to the site. The report describes what happens when the origin URL in that path is not restricted to the site's own domain.

Setup

No account, role or special tooling is described. The researcher only needed a browser and the public hostname. The precondition that matters is the Cloudflare configuration: the program's summary states that the site was on a legacy pricing model, and that this model had a misconfiguration which allowed resizing images outside of the domain for which the request was initiated.

Finding it

During a review of https://nft.production.enjinusercontent.com/, the researcher found that any resource hosted under any external CDN could be rendered on the website without restrictions. In the researcher's framing this produced three outcomes:

  1. HTML injection
  2. SSRF and portal scanning
  3. Unrestricted rendering of resources from external CDNs

The concern is that content the site does not control can be displayed under the site's own URL, which can confuse users, expose sensitive assets, deface the site, or support misinformation and malware campaigns.

Exploitation

Step 1: request an external image through the resize endpoint

The researcher gives a single reproduction URL, pointing the resize path at an SVG hosted on GitHub's raw content host:

HTTP
https://nft.production.enjinusercontent.com/cdn-cgi/image/width=1000,format=auto/https://raw.githubusercontent.com/simple-icons/simple-icons/develop/icons/cloudflare.svg

The path breaks down as follows:

  • /cdn-cgi/image/ selects Cloudflare's image resizing handler.
  • width=1000,format=auto are the transformation options: a target width of 1000 pixels and automatic format selection.
  • https://raw.githubusercontent.com/simple-icons/simple-icons/develop/icons/cloudflare.svg is the source image, on a domain unrelated to enjinusercontent.com.

The researcher states that the external resource was rendered from the enjinusercontent.com origin and labels this HTML injection. The researcher labels this result HTML injection.

image.png
image.png From the original on HackerOne

The report includes a screenshot alongside the reproduction URL.

Root cause

The program's summary attributes the behaviour to a Cloudflare misconfiguration tied to the legacy pricing model: image resizing was permitted for sources outside the domain that initiated the request. In other words, image resizing was permitted for sources outside the domain that initiated the request, so the handler fetched and returned external URLs.

Why existing defences did not stop it is not described in the report.

Impact

The researcher lists the following consequences:

  • Misuse of the cdn-cgi misconfiguration to render external resources.
  • Access control bypass by smuggling external resources to render at the company URL unrestricted.
  • Misinformation and platform manipulation, with displayed content shown to any user without interaction.
  • Redirecting users to other websites, virtual defacement of the site, and webpage modifications.
  • HTML injection.

The report also claims SSRF and portal scanning as an outcome of the same behaviour, but gives no request or response demonstrating either. The program rated the issue low severity.

Fix

According to the program's summary, Cloudflare introduced a toggle for users of the legacy pricing model that allows disabling this functionality without direct engagement with Cloudflare. Enjin disabled the functionality, purged the cache, and confirmed the issue as resolved.

Variants to test

  • Point the resize path at an SVG on an unrelated host, as in the reproduction URL. A positive result is the SVG being returned from the target's own origin.
  • Try other transformation option strings in the same position (width, format and similar) with an external source. A positive result is any successful transformation of a resource the target does not host.
  • Try sources on hosts the target is unlikely to have allow-listed, including raw file hosts and object storage. A positive result is the same external rendering.
  • Check whether the response is cached at the edge, then request the same URL again. A positive result is the external content still being served from the target's origin after the first fetch.

Hunting notes

This class of bug hides in edge features that take a URL as part of the path, and the /cdn-cgi/image/ prefix is a direct signal during recon: any host that answers on that path is worth testing with an external source. Legacy plan configurations are a plausible place for the restriction to be missing, so older or secondary hostnames under a content domain deserve attention even when the main site behaves correctly.

The researcher demonstrated the issue with a single reproduction URL pointing the resize path at an external SVG. The SSRF and portal scanning claims were not backed by requests in the report, and the program treated the finding as low severity.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 7 min read.

What happened, in plain words

Enjin is a company that hosts content for its users. One of its content hosts, nft.production.enjinusercontent.com, sits behind Cloudflare. Cloudflare is a large service that sits between a website and its visitors: it caches pages, filters bad traffic and can also do useful jobs on images, such as shrinking them or changing their file format before sending them to the browser.

One of those jobs is called image resizing, and it is reached through a special path that starts with /cdn-cgi/image/. You put some instructions in that path (how wide the image should be, which format to use) and then the address of an image, and Cloudflare fetches that image, transforms it and sends it back.

The idea is that the image should belong to the site. The researcher found that on this host, the address at the end of the path could point anywhere on the internet. So a visitor could be shown a picture that lives on a completely different company's server, but the browser would think it came from enjinusercontent.com. The program's summary explains why: the site was on an older Cloudflare pricing plan, and that plan had a misconfiguration which allowed resizing images outside of the domain for which the request was initiated.

That is the whole bug. It sounds small, and the program rated it low severity, but it means the company's own web address can be used to display content the company never chose.

The setup you need

Nothing special. No account, no role, no tool beyond a browser and the public hostname. The only precondition is the Cloudflare configuration described above: the legacy pricing model and its misconfiguration.

Finding it

While reviewing https://nft.production.enjinusercontent.com/, the researcher noticed that any resource hosted under any external CDN could be rendered on the website without restrictions. A CDN, or content delivery network, is a network of servers around the world that keeps copies of files close to visitors so pages load faster; the point here is that the file lives on someone else's CDN, not Enjin's.

The researcher grouped the consequences into three outcomes:

  1. HTML injection
  2. SSRF and portal scanning
  3. Unrestricted rendering of resources from external CDNs

HTML injection means putting content into a page that the page's owner did not intend to be there. SSRF, server-side request forgery, means making a server send a request to an address of your choosing, as if the server itself were asking. Portal scanning means probing which services are reachable. The report names these three but only demonstrates the first and third with a request; no request or response is given for SSRF or portal scanning.

The worry is straightforward: content the site does not control can appear under the site's own address. That can confuse visitors, expose sensitive assets, deface the site, or carry misinformation and malware campaigns.

Exploitation

Step 1: ask the resize endpoint for an outside image

The researcher gives one reproduction URL. It points the resize path at an SVG file hosted on GitHub's raw content host. An SVG is a vector image format: a text file describing shapes, which browsers draw as a picture.

HTTP
https://nft.production.enjinusercontent.com/cdn-cgi/image/width=1000,format=auto/https://raw.githubusercontent.com/simple-icons/simple-icons/develop/icons/cloudflare.svg

Line by line, reading the URL from left to right:

  • https://nft.production.enjinusercontent.com is the Enjin host being tested. This is the address the browser shows, and the address the returned content will appear to come from.
  • /cdn-cgi/image/ is the fixed prefix that selects Cloudflare's image resizing handler. Seeing this prefix on any host tells you the feature is switched on there.
  • width=1000,format=auto are the transformation options. width=1000 asks for an image 1000 pixels wide. format=auto lets Cloudflare pick the file format it thinks the browser handles best.
  • https://raw.githubusercontent.com/simple-icons/simple-icons/develop/icons/cloudflare.svg is the source image. It is a Cloudflare logo file on GitHub's raw content host, a domain unrelated to enjinusercontent.com.

The researcher states that the external resource was rendered from the enjinusercontent.com origin and labels this HTML injection. The researcher labels this result HTML injection.

image.png
image.png From the original on HackerOne

The report includes a screenshot alongside the reproduction URL.

Why it worked

The program's summary puts the cause down to a Cloudflare misconfiguration tied to the legacy pricing model: image resizing was permitted for sources outside the domain that initiated the request. In plain terms, image resizing was permitted for sources outside the domain that initiated the request, so the handler fetched and returned external URLs.

Why the site's own defences did not stop it is not described.

Impact

The researcher lists these consequences:

  • Misuse of the cdn-cgi misconfiguration to render external resources.
  • Access control bypass by smuggling external resources to render at the company URL unrestricted.
  • Misinformation and platform manipulation, with displayed content shown to any user without interaction.
  • Redirecting users to other websites, virtual defacement of the site, and webpage modifications.
  • HTML injection.

"Without interaction" matters: a visitor does not have to click anything for the outside content to appear. The report also claims SSRF and portal scanning from the same behaviour, but gives no request or response showing either. The program rated the issue low severity.

The fix

According to the program's summary, Cloudflare introduced a toggle for users of the legacy pricing model that allows disabling this functionality without direct engagement with Cloudflare. Enjin disabled it, purged the cache, and confirmed the issue as resolved. Purging the cache means throwing away the stored copies at the edge, so no old response keeps being served after the change.

Variants to test

If you want to look for the same bug elsewhere, these are the angles worth trying:

  • Point the resize path at an SVG on an unrelated host, as in the reproduction URL. A positive result is the SVG being returned from the target's own origin.
  • Try other transformation option strings in the same position (width, format and similar) with an external source. A positive result is any successful transformation of a resource the target does not host.
  • Try sources on hosts the target is unlikely to have allow-listed, including raw file hosts and object storage. A positive result is the same external rendering.
  • Check whether the response is cached at the edge, then request the same URL again. A positive result is the external content still being served from the target's origin after the first fetch.

Hunting notes

This class of bug hides in edge features that take a URL as part of the path, and the /cdn-cgi/image/ prefix is a direct signal during recon: any host that answers on that path is worth testing with an external source. Recon here just means looking around a target's public hosts before testing. Legacy plan configurations are a plausible place for the restriction to be missing, so older or secondary hostnames under a content domain deserve attention even when the main site behaves correctly.

The researcher demonstrated the issue with a single reproduction URL pointing the resize path at an external SVG. The SSRF and portal scanning claims were not backed by requests in the report, and the program treated the finding as low severity.

Glossary

  • CDN (content delivery network): a set of servers spread around the world that keeps copies of files so visitors get them quickly from a nearby location.
  • Cloudflare: a service that sits between a website and its visitors, providing caching, traffic filtering and features such as image resizing.
  • Origin: the combination of scheme, host and port that a browser treats as one site, for example https://nft.production.enjinusercontent.com. Content served from an origin appears to come from that site.
  • Image resizing: a Cloudflare feature that fetches an image, changes it (for example its width or format) and returns the result.
  • /cdn-cgi/image/: the path prefix that selects Cloudflare's image resizing handler.
  • Transformation options: the instructions in the path, such as width=1000 and format=auto, that say how the image should be changed.
  • SVG: a vector image format, a text file describing shapes that browsers draw as a picture.
  • HTML injection: getting content into a page that the page's owner did not intend to be there.
  • SSRF (server-side request forgery): making a server send a request to an address of your choosing, as if the server itself were asking.
  • Portal scanning: probing which services or ports are reachable on a system.
  • Allow-list: a list of things that are permitted, with everything else refused. Here, the list of source domains the resize handler may fetch from.
  • Misconfiguration: a setting left in a state that allows something the owner did not intend.
  • Legacy pricing model: an older Cloudflare plan that a site still runs on, which can behave differently from current plans.
  • Cache: stored copies of responses kept so they can be served again quickly without redoing the work.
  • Purge the cache: delete those stored copies so no old response keeps being served after a change.
  • Severity: a rating of how serious an issue is, here low.
  • Recon: looking around a target's public hosts and features before testing them.

More by 19whoami19

View all

1 more disclosed report, best first.

More from Enjin

View all

The newest disclosed reports for this program.

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.