astro's client-side router has DOM Clobbering Gadget that leads to XSS
Key facts
- Attack vector
- Network
- Privileges required
- Low
- User interaction
- Required
- Attack complexity
- High
- Impact type
- Cross-site scripting
- Confidentiality · integrity · availability
- Low · Low · High
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub. Impact type from CWE-79.
Summary
The Astro web framework has a DOM Clobbering gadget in the client-side router starting in version 3.0.0 and prior to version 4.16.1. It can lead to cross-site scripting (XSS) in websites enables Astro's client-side routing and has *stored* attacker-controlled scriptless HTML elements (i.e., `iframe` tags with unsanitized `name` attributes) on the destination pages. This vulnerability can result in cross-site scripting (XSS) attacks on websites that built with Astro that enable the client-side routing with `ViewTransitions` and store the user-inserted scriptless HTML tags without properly sanitizing the `name` attributes on the page. Version 4.16.1 contains a patch for this issue.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- Poc
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| withastro | astro | 3.0.0 to before 4.16.1 | 4.16.1 | Patch available | CNA |
| — | astro (npm) | 3.0.0 to before 4.16.1 | 4.16.1 | Patch available | GHSA-m85w-3h95-hcf9 |
- astro Vendorwithastro Affected 3.0.0 to before 4.16.1 Fixed in 4.16.1 Patch available CNA
- astro (npm) Vendor— Affected 3.0.0 to before 4.16.1 Fixed in 4.16.1 Patch available GHSA-m85w-3h95-hcf9
Remediation
- Fix · CNA astro (withastro) Fixed in 4.16.1
- Fix · GHSA-m85w-3h95-hcf9 astro (npm) Fixed in 4.16.1 Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2024-47885
- 2026-10-03 Alias added: GHSA-m85w-3h95-hcf9
References
Advisory 2
More withastro Astro vulnerabilities
- TI-2024-37142 Server source code is exposed to the public if sourcemaps are enabled CVSS 4.0HIGH 7.8
- TI-2025-34958 Unauthorized third-party images in Astro’s _image endpoint CVSS 4.0MEDIUM 6.9
- TI-2025-39915 Server-side request forgery in withastro astro CVSS 3.1MEDIUM 6.5
- TI-2025-38274 Astro's `X-Forwarded-Host` is reflected with no validation CVSS 3.1MEDIUM 6.5
- TI-2026-36915 Astro: Reflected XSS via unescaped slot name CVSS 3.1HIGH 7.1
- TI-2025-40102 Astro is vulnerable to Reflected XSS via the server islands feature CVSS 3.1HIGH 7.1
Sources
- CVE-2024-47885 · CVE Program
- CVE-2024-47885 · NVD
- FIRST EPSS
- GHSA-m85w-3h95-hcf9 · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences