# CVE-2025-55303: Astro _image endpoint third-party domain bypass

Source: https://junglewise.ai/threats/cve-2025-55303-astro-image-endpoint-third-party-domain-bypass  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2025-08-19. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

CVE-2025-55303 · Severity: low · CVSS 3.1 · Published 2025-08-19

Astro's image optimization endpoint, used by websites to serve resized and optimized images, has a flaw that allows attackers to serve images from unauthorized external domains. By using a specially crafted URL, an attacker can bypass the site owner's domain restrictions and serve any third-party image through the site's domain. This could enable cross-site scripting attacks if malicious SVG images are served, potentially compromising visitor accounts or data.

Technologies: [@astrojs/node (npm)](https://junglewise.ai/threats/technologies/astrojs-node), [astro (npm)](https://junglewise.ai/threats/technologies/astro). Vendors: [npm](https://junglewise.ai/threats/vendors/npm).

## Quick answers

**Is CVE-2025-55303 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2025-55303 being exploited in the wild.

**How severe is CVE-2025-55303?** Low severity, with a CVSS score of 3.1, published 19 August 2025.

**Which products and versions are affected?** @astrojs/node (npm) SEMVER:introduced=0,fixed=9.1.1; astro (npm) SEMVER:introduced=5.0.0-alpha.0,fixed=5.13.2.

**Is there a fix for CVE-2025-55303?** Yes. @astrojs/node (npm): upgrade to 9.1.1 or later; astro (npm): upgrade to 5.13.2 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2025-55303 attacked?** It is attacked over the network.

**Am I affected by CVE-2025-55303?** Check whether you run @astrojs/node (npm) or astro (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- @astrojs/node (npm): upgrade to 9.1.1 or later

  ```sh
  npm install @astrojs/node@9.1.1
  ```

- astro (npm): upgrade to 5.13.2 or later

  ```sh
  npm install astro@5.13.2
  ```


## Technical details

The vulnerability is a domain validation bypass in Astro's /_image endpoint (CWE-79). The endpoint is designed to restrict image optimization to local images and developer-authorized remote domains (configured via image.domains or image.remotePatterns), but fails to properly parse protocol-relative URLs (e.g., //example.com/image.png). An unauthenticated attacker on the network can bypass these restrictions by crafting a request like /_image?href=//unauthorized-domain.com/image.png, causing the server to fetch and serve the unauthorized image. This is particularly dangerous for SVG images, which could contain embedded JavaScript leading to XSS. The fix is available in Astro 5.13.2, 4.16.19, and @astrojs/node 9.1.1 or later.

## Affected products

- Astro Astro 5.0.0-alpha.0 to 5.13.1, all versions up to 4.16.18
- Astro @astrojs/node all versions up to 9.1.0

## Identifiers

- CVE-2025-55303
- GHSA-xf8x-j4p2-f749

## Timeline

- 2025-08-19: disclosed: Security advisory published
- 2025-08-19: patched: Fixes available: Astro 5.13.2, 4.16.19, @astrojs/node 9.1.1

## References

- [https://github.com/withastro/astro/security/advisories/GHSA-xf8x-j4p2-f749](https://github.com/withastro/astro/security/advisories/GHSA-xf8x-j4p2-f749)

## Related threats

- [Astro HTML injection in script and style element rendering](https://junglewise.ai/threats/cve-2026-114128-astro-is-a-web-framework-for-content-driven-websites-prior-to-7)
- [Astro CSS injection in View Transition animation values](https://junglewise.ai/threats/cve-2026-114127-astro-is-a-web-framework-for-content-driven-websites-from-7-1-0)
- [Astro Node adapter denial of service in Host header parsing](https://junglewise.ai/threats/cve-2026-102984-astro-is-a-web-framework-for-content-driven-websites-prior-to-11)
- [Astro remote code execution via AVIF image processing](https://junglewise.ai/threats/astro-remote-code-execution-via-avif-image-processing-6b99ffe8)
- [Astro authorization bypass in base path stripping](https://junglewise.ai/threats/cve-2026-84376-astro-authorization-bypass-in-base-path-stripping)
