Junglewise Threat Intelligence

CVE-2025-58179: Astro Cloudflare adapter server-side request forgery in /_image endpoint

CVE-2025-58179 · Severity: low · CVSS 3.1 · Published 2025-09-04

Vendors: npm.

Executive brief

Astro's Cloudflare adapter includes an image optimization endpoint that serves images from authorized domains. A bug in the adapter allows attackers to bypass domain restrictions and serve unauthorized content from any domain, potentially exposing sensitive data or injecting malicious content into a site's pages.

Technical details

The vulnerability is a server-side request forgery (SSRF) in the /_image endpoint of the @astrojs/cloudflare adapter when configured with output: 'server' and default imageService: 'compile'. The endpoint is designed to restrict image optimization to local bundled images and manually authorized remote domains (via image.domains or image.remotePatterns), but the implementation fails to validate URLs, allowing an attacker to craft requests like /_image?href=https://attacker.com/image.png to bypass restrictions. This affects all versions from 11.0.3 to 12.6.5; the vulnerability is patched in version 12.6.6 and later. The attack requires no authentication or user interaction and is remotely exploitable.

Affected products

  • The Astro Technology Company Cloudflare adapter >=11.0.3, <12.6.6

Timeline

  • 2025-09-04: disclosed
  • 2025-09-04: patched: Fixed in version 12.6.6

References

Related threats