LOWCVSS v4 2.3Vulnerability

CVE-2026-126361

## Summary When a dynamic tag (`const Tag = ...; <Tag />`) resolves to a string, Astro renders it as a raw HTML element name. The name was filtered to remove characters that could inject attributes, but the filter did not handle `/`. Because HTML parsers treat `/` inside a tag as an attribute separator, a tag name such as `img/src/onerror=alert(1)` was rendered as an `<img>` element with an `onerror` attribute. The JSX renderer used for MDX did not filter string tag names at all. For example: ```astro --- const Tag = Astro.url.searchParams.get('as') ?? 'div'; --- <Tag>hello</Tag> ``` rendered `?as=img/src/onerror=alert(1)` as live HTML. ## Impact Reflected or stored cross-site scripting, but only in applications that use untrusted input (such as a request parameter or an uncontrolled CMS field) as all or part of an element name. Astro itself never derives element names from request data. Applications that let content choose an element should map that input to a fixed set of known tags. Letting untrusted input choose an element name is unsafe even with a correct filter, because it can still select elements such as `script` or `iframe`. ## Affected versions `astro` <= 7.4.4. ## Patches Fixed in `astro` 7.4.5. String tag names in `.astro` dynamic tags, JSX, and MDX now render only the leading valid element name, so characters such as `/` or `=` can no longer change the generated markup. Strings that do not start with a valid element name now throw an error. ## Workarounds Upgrade to `astro` 7.4.5 or later. Before upgrading, do not use untrusted input as an element name, or map it to a fixed set of known tags. ## Credits Reported by @uttej-badwane.

Properties

Severity
low
Summary
Astro: XSS via attribute injection in dynamic tag names
Nvd fetched at
2026-11-14T00:40:25.638091+00:00
Epss score
0.00315
Cvss severity
LOW
Cvss score
2.3
Retrieved at
2026-11-14T00:51:03+00:00
Ghsa published
2026-11-13T18:39:54Z
Source url
https://github.com/advisories/GHSA-mh32-jxcr-mh9f
Ghsa updated
2026-11-13T18:39:55Z
Ghsa id
GHSA-mh32-jxcr-mh9f
Last source
FIRST EPSS
Score
2.3
Cvss version
4.0
Cve id
CVE-2026-126361
Cvss 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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
First seen by Signal
2026-11-13T04:09:07+00:00
Is ghsa only
false
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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
Published at
2026-11-13T00:20:11.587

Related Entities (4)

AFFECTS (1)

→[Software]npm/astro

VULNERABLE_TO (1)

←[Software]npm/astro

Related research

Explore deeper with Ninja Signal's threat intelligence graph

CVE-2026-126361 (CVSS v4 2.3) — Ninja Signal Threat Intelligence | Ninja Signal