{"id":"CVE-2026-126363","aliases":["CVE-2026-126363","GHSA-jmv2-qgxf-f995"],"related":[],"kind":"vulnerability","state":"published","title":"Astro: Reflected XSS via unescaped slot names in @astrojs/solid-js","summary":"Astro is a web framework for content-driven websites. From 0.2.0 until 7.1.2, the @astrojs/solid-js renderer inserted a named slot into the quoted name attribute of an astro-slot wrapper without HTML escaping. A request-controlled slot name containing a quote could terminate the attribute and inject active HTML. Exploitation required a hydrated Solid component using a client:* directive and dynamic access to the attacker-chosen slot property; a component that did not render that slot emitted only escaped fallback content. This issue is fixed in version 7.1.2.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Astro is a web framework for content-driven websites. From 0.2.0 until 7.1.2, the @astrojs/solid-js renderer inserted a named slot into the quoted name attribute of an astro-slot wrapper without HTML escaping. A request-controlled slot name containing a quote could terminate the attribute and inject active HTML. Exploitation required a hydrated Solid component using a client:* directive and dynamic access to the attacker-chosen slot property; a component that did not render that slot emitted only escaped fallback content. This issue is fixed in version 7.1.2.","source":"cvelist"},{"lang":"en","text":"## Summary\n\nThe `@astrojs/solid-js` renderer wraps named slot content passed to Solid components in an `<astro-slot>` element, and writes the slot name into its `name` attribute without HTML escaping. A slot name containing `\"` could end the attribute and inject arbitrary HTML into the page.\n\nFor example, a page that takes a slot name from the request:\n\n```astro\n---\nimport Tabs from '../components/Tabs.jsx';\nconst tab = Astro.url.searchParams.get('tab');\n---\n<Tabs client:load active={tab}><div slot={tab}>…</div></Tabs>\n```\n\nrendered with a Solid component that renders a slot by name:\n\n```jsx\nexport default function Tabs(props) {\n\treturn <div>{props[props.active]}</div>;\n}\n```\n\nwould output a `tab` value such as `x\"><img src=x onerror=alert(1)>` as live HTML.\n\n## Impact\n\nReflected cross-site scripting. An attacker who gets a user to open a crafted link can run JavaScript on the site's origin, but only in applications where all of the following are true:\n\n- The page passes request-controlled input (such as a query parameter) as a slot name.\n- The Solid component is hydrated with a `client:*` directive. For non-hydrated components the slot wrapper is removed from the output, together with its `name` attribute.\n- The Solid component renders the attacker-chosen slot, which in practice means accessing slot props by a dynamic name. Components that never render the slot only output Astro's already escaped fallback template.\n\nThis is the `@astrojs/solid-js` counterpart of GHSA-8hv8-536x-4wqp (CVE-2026-50146), which fixed the same issue in `astro` core.\n\n## Affected versions\n\n`@astrojs/solid-js` >= 0.2.0, <= 7.1.1.\n\n## Patches\n\nFixed in `@astrojs/solid-js` 7.1.2. Slot names are now HTML-escaped in the server renderer.\n\n## Workarounds\n\nUpgrade to `@astrojs/solid-js` 7.1.2 or later. Before upgrading, do not use request-controlled input as a slot name, or map it to a fixed set of known slot names before passing it to a component.\n\n## Credits\n\nReported by @manus-pi.","format":"markdown","source":"ghsa"}],"published":"2026-11-12T22:31:46.889Z","modified":"2026-11-17T22:17:19.200Z","severity":{"scorer":"GitHub_M","scheme":"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","score":2.3,"rating":"LOW"},"severities":[{"scorer":"GitHub_M","scheme":"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","score":2.3,"rating":"LOW"},{"scorer":"GitHub","scheme":"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","rating":"LOW"}],"cwes":["CWE-79"],"affected":[{"ranges":[{"version":">= 0.2.0, < 7.1.2","status":"affected"}],"vendor":"withastro","product":"astro","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0.2.0","status":"affected","fixed":"7.1.2"}],"ecosystem":"npm","package":"@astrojs/solid-js","purl":"pkg:npm/%40astrojs/solid-js","source":"ghsa"}],"references":[{"url":"https://github.com/withastro/astro/security/advisories/GHSA-jmv2-qgxf-f995","tags":["web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/withastro/astro/commit/290b196ddb48de11783ff128e2b7272c61490a20","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/withastro/astro/releases/tag/@astrojs/solid-js@7.1.2","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/withastro/astro","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-11-17T12:22:27.255Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-126363","url":"https://www.cve.org/CVERecord?id=CVE-2026-126363","licence":"CVE Terms of Use","modified":"2026-11-17T12:22:37.244Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-jmv2-qgxf-f995","url":"https://github.com/advisories/GHSA-jmv2-qgxf-f995","licence":"CC-BY-4.0","modified":"2026-11-12T22:45:04.210Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-126363","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-126363","licence":"Public domain","modified":"2026-11-17T22:17:19.200Z"}],"updatedAt":"2026-11-25T22:59:50.579Z","epss":{"score":0.00403,"percentile":0.3672,"date":"2026-12-01T12:00:22.000Z"}}