# CVE-2024-47885: astro's client-side router has DOM Clobbering Gadget that leads to XSS

- Severity: Medium 5.9 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:L/I:L/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.45%, higher than 40% of CVEs (2026-12-01)
- Published: 2024-10-14T19:06:09.681Z
- Modified: 2026-06-17T07:57:55.130Z
- Also known as: GHSA-m85w-3h95-hcf9
- Weaknesses: CWE-79
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial
- Assigned by: GitHub_M

## Description

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.

(As written by CVE List.)

## Affected

- withastro astro: >=3.0.0, < 4.16.1; from 3.0.0 before 4.16.1
- astro (npm): from 3.0.0 before 4.16.1
- astro astro: from 3.0.0 before 4.16.1

## Every score

- GitHub_M: CVSS:3.1 5.9 Medium `CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:L/I:L/A:H`
- GitHub: CVSS:3.1 5.9 Medium `CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:L/I:L/A:H`
- NVD: CVSS:3.1 5.4 Medium `CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N`

## References

- <https://github.com/withastro/astro/security/advisories/GHSA-m85w-3h95-hcf9> (vendor-advisory, web)
- <https://github.com/withastro/astro/commit/a4ffbfaa5cb460c12bd486fd75e36147f51d3e5e> (patch, web)
- <https://github.com/withastro/astro/blob/7814a6cad15f06931f963580176d9b38aa7819f2/packages/astro/src/transitions/router.ts#L135-L156> (product, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2024-47885> (advisory)
- <https://github.com/withastro/astro> (package)

## Sources

- CVE List: [CVE-2024-47885](https://www.cve.org/CVERecord?id=CVE-2024-47885), CVE Terms of Use, modified 2024-10-15
- GitHub Advisory Database: [GHSA-m85w-3h95-hcf9](https://github.com/advisories/GHSA-m85w-3h95-hcf9), CC-BY-4.0, modified 2025-11-27
- NVD: [CVE-2024-47885](https://nvd.nist.gov/vuln/detail/CVE-2024-47885), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2024-47885 · Whole record: https://cve.day/CVE-2024-47885.json · Rebuilt by cve.day 2026-11-25T22:58:46.737Z
