{"id":"CVE-2025-58179","aliases":["CVE-2025-58179","GHSA-qpr4-c339-7vq8"],"related":[],"kind":"vulnerability","state":"published","title":"Astro Cloudflare adapter is vulnerable to Server-Side Request Forgery via /_image endpoint","summary":"Astro is a web framework for content-driven websites. Versions 11.0.3 through 12.6.5 are vulnerable to SSRF when using Astro's Cloudflare adapter. When configured with output: 'server' while using the default imageService: 'compile', the generated image optimization endpoint doesn't check the URLs it receives, allowing content from unauthorized third-party domains to be served. a A bug in impacted versions of the @astrojs/cloudflare adapter for deployment on Cloudflare’s infrastructure, allows an attacker to bypass the third-party domain restrictions and serve any content from the vulnerable origin. This issue is fixed in version 12.6.6.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Astro is a web framework for content-driven websites. Versions 11.0.3 through 12.6.5 are vulnerable to SSRF when using Astro's Cloudflare adapter. When configured with output: 'server' while using the default imageService: 'compile', the generated image optimization endpoint doesn't check the URLs it receives, allowing content from unauthorized third-party domains to be served. a A bug in impacted versions of the @astrojs/cloudflare adapter for deployment on Cloudflare’s infrastructure, allows an attacker to bypass the third-party domain restrictions and serve any content from the vulnerable origin. This issue is fixed in version 12.6.6.","source":"cvelist"},{"lang":"en","text":"### Summary\n\nWhen using Astro's Cloudflare adapter (`@astrojs/cloudflare`) configured with `output: 'server'` while using the default `imageService: 'compile'`, the generated image optimization endpoint doesn't check the URLs it receives, allowing content from unauthorized third-party domains to be served.\n\n### Details\n\nOn-demand rendered sites built with Astro include an `/_image` endpoint, which returns optimized versions of images.\n\nThe `/_image` endpoint is restricted to processing local images bundled with the site and also supports remote images from domains the site developer has manually authorized (using the [`image.domains`](https://docs.astro.build/en/reference/configuration-reference/#imagedomains) or [`image.remotePatterns`](https://docs.astro.build/en/reference/configuration-reference/#imageremotepatterns) options).\n\nHowever, a bug in impacted versions of the `@astrojs/cloudflare` adapter for deployment on Cloudflare’s infrastructure, allows an attacker to bypass the third-party domain restrictions and serve any content from the vulnerable origin.\n\n### PoC\n\n1. Create a new minimal Astro project (`astro@5.13.3`)\n\n2. Configure it to use the Cloudflare adapter (`@astrojs/cloudflare@12.6.5`) and server output:\n\n   ```js\n   // astro.config.mjs\n   import { defineConfig } from 'astro/config';\n   import cloudflare from '@astrojs/cloudflare';\n\n   export default defineConfig({\n     output: 'server',\n     adapter: cloudflare(),\n   });\n   ```\n\n3. Deploy to Cloudflare Pages or Workers\n\n4. Append `/_image?href=https://placehold.co/600x400` to the deployment URL.\n\n7. This will serve the placeholder image from the unauthorised `placehold.co` domain.\n\n### Impact\n\nAllows a non-authorized third-party to create URLs on an impacted site’s origin that serve unauthorized content. This includes the risk of server-side request forgery (SSRF) and by extension cross-site scripting (XSS) if a user follows a link to a maliciously crafted URL.","format":"markdown","source":"ghsa"}],"published":"2025-09-04T19:24:11.000Z","modified":"2026-06-17T09:44:01.297Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N","score":7.2,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N","score":7.2,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N","score":7.2,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N","score":6.5,"rating":"MEDIUM"}],"cwes":["CWE-918"],"affected":[{"ranges":[{"version":">= 11.0.3, < 12.6.6","status":"affected"}],"vendor":"withastro","product":"astro","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"11.0.3","status":"affected","fixed":"12.6.6"}],"ecosystem":"npm","package":"@astrojs/cloudflare","purl":"pkg:npm/%40astrojs/cloudflare","source":"ghsa"},{"ranges":[{"status":"affected","introduced":"11.0.3","fixed":"12.6.6"}],"vendor":"astro","product":"@astrojs/cloudflare","cpe":"cpe:2.3:a:astro:\\@astrojs\\/cloudflare:*:*:*:*:*:node.js:*:*","source":"nvd"}],"references":[{"url":"https://github.com/withastro/astro/security/advisories/GHSA-qpr4-c339-7vq8","tags":["exploit","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/withastro/astro/commit/9ecf3598e2b29dd74614328fde3047ea90e67252","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-58179","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/withastro/astro","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"yes","technicalImpact":"partial","date":"2025-09-05T14:53:18.491Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-58179","url":"https://www.cve.org/CVERecord?id=CVE-2025-58179","licence":"CVE Terms of Use","modified":"2025-09-05T14:53:29.299Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-qpr4-c339-7vq8","url":"https://github.com/advisories/GHSA-qpr4-c339-7vq8","licence":"CC-BY-4.0","modified":"2025-09-05T16:10:42.000Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-58179","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-58179","licence":"Public domain","modified":"2026-06-17T09:44:01.297Z"}],"updatedAt":"2026-11-25T22:59:04.204Z","epss":{"score":0.00939,"percentile":0.61932,"date":"2026-12-01T12:00:22.000Z"}}