CVE-2026-126361: Astro: XSS via attribute injection in dynamic tag names
Published 2026-11-13 · Updated 2026-11-13 · Also known as GHSA-mh32-jxcr-mh9f
Summary
Astro contains an XSS vulnerability via attribute injection in dynamic tag names when strings contain characters like slashes. Engineering teams using Astro versions up to 7.4.4 that process untrusted input for dynamic tags should upgrade immediately.
Who is affected
Reflected or stored cross-site scripting can occur in applications that utilize untrusted input, such as request parameters or uncontrolled CMS fields, as all or part of a dynamic element name. Astro itself does not derive element names from request data by default, requiring applications to actively pass untrusted input into dynamic tag names for the vulnerability to be triggered.
Exploitability
The vulnerability requires network access and user interaction with low attack complexity, though it relies on phishing or tricking a user with a crafted input payload since attack requirements involve partial conditions. The EPSS score is 0.003 and it is not present in the CISA Known Exploited Vulnerabilities catalog.
Remediation
- Upgrade the astro package to version 7.4.5 or later.
- Avoid using untrusted input as an element name or map any dynamic input to a fixed set of known tags prior to upgrading.
How to check your project
- Check project dependency files such as package.json or lockfiles to determine if the installed 'astro' package version is <= 7.4.4.
- Audit codebase usages of dynamic tags (such as <Tag />) to verify if untrusted user input or request parameters are being passed to define tag names.
Automated analysis of the published advisory data, generated 2026-11-19. Not human-reviewed; verify against the official advisory. How this works.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | Upgrade |
|---|---|---|---|---|
| npm | astro |
>= 0, < 7.4.5 | 7.4.5 | npm install [email protected] |
Tracked tools affected
Astro · Astro security advisories · Fixed in Astro 7.4.5 release notes
CVSS 4.0 vector
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:L/VI:L/VA:N/SC:L/SI:L/SA:N
| Attack vector | Network |
|---|---|
| Attack complexity | Low |
| Attack requirements | Present |
| Privileges required | None |
| User interaction | Passive |
| Confidentiality (vulnerable system) | Low |
| Integrity (vulnerable system) | Low |
| Availability (vulnerable system) | None |
| Confidentiality (subsequent systems) | Low |
| Integrity (subsequent systems) | Low |
| Availability (subsequent systems) | None |
Base score is not computed for CVSS 4.0 vectors; severity is taken from the advisory.
FAQ
What causes the XSS vulnerability in Astro?
When a dynamic tag resolves to a string, the filtering logic failed to handle slashes correctly. Because HTML parsers treat slashes inside a tag name as attribute separators, malicious input could inject arbitrary HTML attributes like onerror.
Which versions of Astro are affected?
All astro versions up to and including 7.4.4 are affected.
How was the issue resolved?
The issue is fixed in astro version 7.4.5, where string tag names render only the leading valid element name and strings not starting with a valid element name throw an error.
Original advisory description
References
- WEB https://github.com/withastro/astro/security/advisories/GHSA-mh32-jxcr-mh9f
- ADVISORY https://nvd.nist.gov/vuln/detail/CVE-2026-126361
- WEB https://github.com/withastro/astro/pull/18520
- WEB https://github.com/withastro/astro/commit/e023abac912d7cb6af2b9fb5107ef5dabc667096
- PACKAGE https://github.com/withastro/astro
- WEB https://github.com/withastro/astro/releases/tag/[email protected]
Source records: GHSA-mh32-jxcr-mh9f (OSV.dev) · EPSS by FIRST, 2026-11-26.