{
  "schema_version": "1.6.7",
  "id": "PRECVE-2026-D24B15D4",
  "modified": "2026-11-24T00:00:00Z",
  "published": "2026-11-24T00:00:00Z",
  "summary": "A cross-site scripting (XSS) vulnerability was discovered in Cloudflare's /cdn-cgi/image/ endpoint due to a bypass in the svg-hush SVG sanitizer combined with Chromium's handling of Cache-Control no-cache header directives that exclude Content-Security-Policy and Content-Type headers from cached responses.",
  "details": "The vulnerability chain involves three key components: a serialization bug in the svg-hush SVG sanitizer that allows injection of unescaped namespace attributes, Chromium's selective header exclusion from cached responses via Cache-Control: no-cache=\"Content-Security-Policy, Content-Type\", and an open redirect chain through Cloudflare Access endpoints enabling attacker-controlled image loading even under restrictive source configurations. This allows an attacker to bypass strict Content Security Policies and cause execution of attacker-controlled scripts via SVG images served through Cloudflare's image transformation service. Similar techniques were demonstrated on Netlify Image CDN and S3-backed origins using signed URL response header overrides.",
  "affected": [
    {
      "package": {
        "ecosystem": "Generic",
        "name": "cloudflare/cdn-cgi-image",
        "purl": "pkg:generic/cloudflare/cdn-cgi-image"
      },
      "ranges": [
        {
          "type": "ECOSYSTEM",
          "events": [
            {
              "introduced": "0"
            }
          ]
        }
      ],
      "database_specific": {
        "zerobom": {
          "evidence_quotes": [
            "After achieving XSS through Cloudflare's /cdn-cgi/image/ endpoint, we wondered whether the same Cache-Control primitive could be used elsewhere. Looking into mainstream frameworks offering similar image-optimization features, such as Next.js, we quickly encountered limitations. Next.js, for example, only retrieves the s-maxage or max-age directive before converting its value to an integer.\nHowever, after pushing the research further, one service stood out: Netlify Image CDN.\nFor Netlify, the conditions under which a remote image can be loaded depend on the remote_images configuration. We identified three potential scenarios:\n- remote_images contains a catch-all regular expression:\n[images]\nremote_images = [\".*\"]\n- remote_images contains an incorrectly escaped regular expression. For example, the following configuration also accepts https://aab.com/ because\n[images]\nremote_images = [\"^https://a.b.com/.*$\"]\n- An allowed origin contains an open redirect. As with /cdn-cgi/image/, the redirect destination is not checked against the remote_images configuration.\nThe public Netlify image handler follows the same general structure: it validates the initial source URL against remote_images, then passes it to IPX with allowAllDomains enabled.\nWhen loading an image/svg+xml image, the response looked like this:\nHTTP/2 200\nContent-Security-Policy: script-src 'none'\nContent-Type: image/svg+xml\nCache-Status: \"Netlify Edge\"; fwd=miss; fwd-status=200; stored\nServer: Netlify\nContent-Length: 125\nNetlify's open-source Image CDN implementation, used by Netlify Dev to emulate the production endpoint, passes SVG images to IPX. IPX then invokes SVGO's removeScripts plugin to sanitize them.\nThe hosted implementation is not public, so we cannot confirm that it uses the exact same code path.\nAt this point, we asked ourselves:\nDo we really need to understand and bypass the sanitizer to get an XSS with the Cache-Control primitive?\nThe answer was: not really :)\nUntil then, we had only used the qualified no-cache directive to exclude the Content-Security-Policy header from Chromium's cached representation. However, the same primitive can exclude any response header, including Content-Type.\nWithout Content-Type or X-Content-Type-Options: nosniff, Chromium attempts to determine the response type from its contents. This is part of Chromium's MIME-sniffing implementation:\n#define MAGIC_HTML_TAG(tag) \\\n  MAGIC_STRING(\"text/html\", \"<\" tag)\nstatic const MagicNumber kSniffableTags[] = {\n  MAGIC_NUMBER(\"text/xml\", \"<?xml\"),\n  MAGIC_HTML_TAG(\"!DOCTYPE html\"),\n  MAGIC_HTML_TAG(\"script\"),\n  MAGIC_HTML_TAG(\"html\"),\n  MAGIC_HTML_TAG(\"!--\"),\n  MAGIC_HTML_TAG(\"head\"),\n  MAGIC_HTML_TAG(\"iframe\"),\n  MAGIC_HTML_TAG(\"h1\"),\n  MAGIC_HTML_TAG(\"div\"),\n  MAGIC_HTML_TAG(\"font\"),\n  MAGIC_HTML_TAG(\"table\"),\n  MAGIC_HTML_TAG(\"a\"),\n  MAGIC_HTML_TAG(\"style\"),\n  MAGIC_HTML_TAG(\"title\"),\n  MAGIC_HTML_TAG(\"b\"),\n  MAGIC_HTML_TAG(\"body\"),\n  MAGIC_HTML_TAG(\"br\"),\n  MAGIC_HTML_TAG(\"p\"),\n};\nSo, excluding Content-Type: image/svg+xml from the cached response causes an SVG beginning with <!DOCTYPE html> to be sniffed as text/html when restored from Chromium's disk cache:\n<!doctype html>\n<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\">\n...\n</svg>\nThis is especially useful because SVG documents are normally parsed as XML, which differs significantly from HTML parsing. One difference that can be exploited is how processing instructions are terminated.\nIn XML, the processing instruction continues until ?> (source):\n<?pi INSIDE PI > INSIDE PI ?>\nIn HTML, it ends at the first > (source):\n<?pi INSIDE PI > OUTSIDE PI ?>\nBecause of this slight difference, markup can remain inert inside a processing instruction while the document is parsed and sanitized as SVG, then become active when the same body is reparsed as HTML.\nThis works because SVGO's removeScripts plugin only registers an element visitor. Processing-instruction nodes are not inspected or removed.\nThe complete primitive therefore uses the following response header:\nCache-Control: no-cache=\"Content-Security-Policy, Content-Type\"\nCombined with this SVG/HTML polyglot:\n<!doctype html>\n<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\">\n<?a ><script>alert(location.href)</script> a?>\n</svg>\nThe resulting chain is:\nThinking about where else the no-cache directive could be used led us to cloud object storage. As highlighted by the varmarunionen challenge from @avlidienbrunn, and later covered by @AmirMSafari in Content-Type Override to Stored XSS on Public Objects, publicly readable S3 objects can be requested through presigned URLs generated with our own AWS credentials.\nThis works because the object is readable by every AWS identity, while signing the request unlocks the following GetObject response-header overrides:\n- response-cache-control\n- response-content-disposition\n- response-content-encoding\n- response-content-language\n- response-content-type\n- response-expires\nBtw, the response-content-type technique also works with Google Cloud Storage V4 signed URLs.\nThe original technique consists of including response-content-type=text/html in the signed request. This overrides the stored Content-Type of an uploaded object, allowing a PNG/HTML polyglot to be served and parsed as HTML.\nThis is especially interesting when a bucket is exposed through a custom domain, a CNAME, a proxy_pass endpoint, or any other configuration that forwards the original query parameters to S3.\nHowever, the technique does not work on its own when the storage response is protected by a CSP. This is where Chromium's Cache-Control: no-cache=\"<field-name>\" behavior can push it further. By also including the following signed parameter: response-cache-control=no-cache=\"Content-Security-Policy\""
          ],
          "grounding_status": "quote_only_weak",
          "registry_status": "skipped",
          "routing": "triage"
        }
      }
    }
  ],
  "references": [
    {
      "type": "ARTICLE",
      "url": "https://www.slcyber.io/research/cache-me-if-you-can-xss-in-cloudflares-cdn-cgi-image"
    },
    {
      "type": "EVIDENCE",
      "url": "https://www.slcyber.io/research/cache-me-if-you-can-xss-in-cloudflares-cdn-cgi-image"
    },
    {
      "type": "WEB",
      "url": "https://www.slcyber.io/research/cache-me-if-you-can-xss-in-cloudflares-cdn-cgi-image"
    }
  ],
  "database_specific": {
    "zerobom": {
      "source_tier": "tier_1",
      "source_tier_weight": 1.0,
      "extraction_specificity": 0.6,
      "composite_score": 0.6,
      "routing": "triage",
      "severity": "HIGH",
      "cwe_ids": [],
      "evidence_quotes": [
        "After achieving XSS through Cloudflare's /cdn-cgi/image/ endpoint, we wondered whether the same Cache-Control primitive could be used elsewhere. Looking into mainstream frameworks offering similar image-optimization features, such as Next.js, we quickly encountered limitations. Next.js, for example, only retrieves the s-maxage or max-age directive before converting its value to an integer.\nHowever, after pushing the research further, one service stood out: Netlify Image CDN.\nFor Netlify, the conditions under which a remote image can be loaded depend on the remote_images configuration. We identified three potential scenarios:\n- remote_images contains a catch-all regular expression:\n[images]\nremote_images = [\".*\"]\n- remote_images contains an incorrectly escaped regular expression. For example, the following configuration also accepts https://aab.com/ because\n[images]\nremote_images = [\"^https://a.b.com/.*$\"]\n- An allowed origin contains an open redirect. As with /cdn-cgi/image/, the redirect destination is not checked against the remote_images configuration.\nThe public Netlify image handler follows the same general structure: it validates the initial source URL against remote_images, then passes it to IPX with allowAllDomains enabled.\nWhen loading an image/svg+xml image, the response looked like this:\nHTTP/2 200\nContent-Security-Policy: script-src 'none'\nContent-Type: image/svg+xml\nCache-Status: \"Netlify Edge\"; fwd=miss; fwd-status=200; stored\nServer: Netlify\nContent-Length: 125\nNetlify's open-source Image CDN implementation, used by Netlify Dev to emulate the production endpoint, passes SVG images to IPX. IPX then invokes SVGO's removeScripts plugin to sanitize them.\nThe hosted implementation is not public, so we cannot confirm that it uses the exact same code path.\nAt this point, we asked ourselves:\nDo we really need to understand and bypass the sanitizer to get an XSS with the Cache-Control primitive?\nThe answer was: not really :)\nUntil then, we had only used the qualified no-cache directive to exclude the Content-Security-Policy header from Chromium's cached representation. However, the same primitive can exclude any response header, including Content-Type.\nWithout Content-Type or X-Content-Type-Options: nosniff, Chromium attempts to determine the response type from its contents. This is part of Chromium's MIME-sniffing implementation:\n#define MAGIC_HTML_TAG(tag) \\\n  MAGIC_STRING(\"text/html\", \"<\" tag)\nstatic const MagicNumber kSniffableTags[] = {\n  MAGIC_NUMBER(\"text/xml\", \"<?xml\"),\n  MAGIC_HTML_TAG(\"!DOCTYPE html\"),\n  MAGIC_HTML_TAG(\"script\"),\n  MAGIC_HTML_TAG(\"html\"),\n  MAGIC_HTML_TAG(\"!--\"),\n  MAGIC_HTML_TAG(\"head\"),\n  MAGIC_HTML_TAG(\"iframe\"),\n  MAGIC_HTML_TAG(\"h1\"),\n  MAGIC_HTML_TAG(\"div\"),\n  MAGIC_HTML_TAG(\"font\"),\n  MAGIC_HTML_TAG(\"table\"),\n  MAGIC_HTML_TAG(\"a\"),\n  MAGIC_HTML_TAG(\"style\"),\n  MAGIC_HTML_TAG(\"title\"),\n  MAGIC_HTML_TAG(\"b\"),\n  MAGIC_HTML_TAG(\"body\"),\n  MAGIC_HTML_TAG(\"br\"),\n  MAGIC_HTML_TAG(\"p\"),\n};\nSo, excluding Content-Type: image/svg+xml from the cached response causes an SVG beginning with <!DOCTYPE html> to be sniffed as text/html when restored from Chromium's disk cache:\n<!doctype html>\n<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\">\n...\n</svg>\nThis is especially useful because SVG documents are normally parsed as XML, which differs significantly from HTML parsing. One difference that can be exploited is how processing instructions are terminated.\nIn XML, the processing instruction continues until ?> (source):\n<?pi INSIDE PI > INSIDE PI ?>\nIn HTML, it ends at the first > (source):\n<?pi INSIDE PI > OUTSIDE PI ?>\nBecause of this slight difference, markup can remain inert inside a processing instruction while the document is parsed and sanitized as SVG, then become active when the same body is reparsed as HTML.\nThis works because SVGO's removeScripts plugin only registers an element visitor. Processing-instruction nodes are not inspected or removed.\nThe complete primitive therefore uses the following response header:\nCache-Control: no-cache=\"Content-Security-Policy, Content-Type\"\nCombined with this SVG/HTML polyglot:\n<!doctype html>\n<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\">\n<?a ><script>alert(location.href)</script> a?>\n</svg>\nThe resulting chain is:\nThinking about where else the no-cache directive could be used led us to cloud object storage. As highlighted by the varmarunionen challenge from @avlidienbrunn, and later covered by @AmirMSafari in Content-Type Override to Stored XSS on Public Objects, publicly readable S3 objects can be requested through presigned URLs generated with our own AWS credentials.\nThis works because the object is readable by every AWS identity, while signing the request unlocks the following GetObject response-header overrides:\n- response-cache-control\n- response-content-disposition\n- response-content-encoding\n- response-content-language\n- response-content-type\n- response-expires\nBtw, the response-content-type technique also works with Google Cloud Storage V4 signed URLs.\nThe original technique consists of including response-content-type=text/html in the signed request. This overrides the stored Content-Type of an uploaded object, allowing a PNG/HTML polyglot to be served and parsed as HTML.\nThis is especially interesting when a bucket is exposed through a custom domain, a CNAME, a proxy_pass endpoint, or any other configuration that forwards the original query parameters to S3.\nHowever, the technique does not work on its own when the storage response is protected by a CSP. This is where Chromium's Cache-Control: no-cache=\"<field-name>\" behavior can push it further. By also including the following signed parameter: response-cache-control=no-cache=\"Content-Security-Policy\""
      ],
      "article_type": "original_disclosure",
      "source_name": "Assetnote / Searchlight Cyber Research Center",
      "prompt_version": "v1.5",
      "extractor_model": "gpt-4.1-mini"
    }
  }
}
