Miggo Logo

CVE-2025-55303: Astro allows unauthorized third-party images in _image endpoint

N/A

CVSS Score

Basic Information

EPSS Score
-
Published
8/19/2025
Updated
8/19/2025
KEV Status
No
Technology
TechnologyJavaScript

Technical Details

CVSS Vector
-
Package NameEcosystemVulnerable VersionsFirst Patched Version
astronpm>= 5.0.0-alpha.0, <= 5.13.05.13.2
@astrojs/nodenpm<= 9.1.09.1.1
astronpm<= 4.16.184.16.19

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability exists in the /_image endpoint, which is handled by the GET functions in packages/astro/src/assets/endpoint/generic.ts and packages/astro/src/assets/endpoint/node.ts. The core of the issue lies in the isRemotePath utility function, which failed to correctly identify protocol-relative URLs (e.g., //example.com/image.png) as remote. An attacker could craft a URL to the /_image endpoint using a protocol-relative href parameter pointing to an unauthorized domain. The server would then fetch and serve the image from this domain, bypassing the intended security restrictions. This could be used to serve malicious content, such as specially crafted SVGs that could lead to Cross-Site Scripting (XSS). The patches address this by updating the path validation logic in @astrojs/internal-helpers to correctly classify protocol-relative URLs as remote, ensuring that the domain authorization checks are properly applied.

Vulnerable functions

Only Mi**o us*rs **n s** t*is s**tion

WAF Protection Rules

WAF Rule

### Summ*ry In *****t** v*rsions o* `*stro`, t** im*** optimiz*tion *n*point in proj**ts **ploy** wit* on-**m*n* r*n**rin* *llows im***s *rom un*ut*oriz** t*ir*-p*rty *om*ins to ** s*rv**. ### **t*ils On-**m*n* r*n**r** sit*s *uilt wit* *stro in*l

Reasoning

T** vuln*r**ility *xists in t** `/_im***` *n*point, w*i** is **n*l** *y t** `**T` *un*tions in `p**k***s/*stro/sr*/*ss*ts/*n*point/**n*ri*.ts` *n* `p**k***s/*stro/sr*/*ss*ts/*n*point/no**.ts`. T** *or* o* t** issu* li*s in t** `isR*mot*P*t*` utility