{"id":"CVE-2026-41305","published":"2026-04-24T02:27:47Z","modified":"2026-04-24T16:23:41Z","title":"PostCSS has XSS via Unescaped </style> in its CSS Stringify Output","vendor":"postcss","product":"postcss","tier":"tail","description":{"text":"PostCSS takes a CSS file and provides an API to analyze and modify its rules by transforming the rules into an Abstract Syntax Tree. Versions prior to 8.5.10 do not escape `</style>` sequences when stringifying CSS ASTs. When user-submitted CSS is parsed and re-stringified for embedding in HTML `<style>` tags, `</style>` in CSS values breaks out of the style context, enabling XSS. Version 8.5.10 fixes the issue.","provenance":"source","from":"CVE.org"},"cvss":{"score":6.1,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00213,"percentile":0.11606,"provenance":"source"},"cwes":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"}],"references":[{"url":"https://github.com/postcss/postcss/security/advisories/GHSA-qx2v-qp2m-jg93","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/postcss/postcss/releases/tag/8.5.10","tags":["x_refsource_MISC"]}],"priority":{"score":6.6,"factors":[{"name":"EPSS percentile","points":2.32},{"name":"CVSS severity","points":4.27}]},"vendorSlug":"postcss","affectedVersions":[{"vendor":"postcss","product":"postcss","versions":["< 8.5.10"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"partial","timestamp":"2026-04-24T16:22:58.569354Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"npm","package":"postcss","vulnerableRanges":["<8.5.10"],"patched":["8.5.10"],"from":["GHSA-qx2v-qp2m-jg93"],"provenance":"source"}],"summary":{"text":"PostCSS, the CSS parsing and transformation library, fails to escape </style> sequences when stringifying its CSS abstract syntax tree, a flaw in its CSS stringify output in versions prior to 8.5.10. An attacker who can supply CSS that is parsed, re-stringified, and embedded in an HTML <style> tag can use a </style> sequence in a CSS value to break out of the style context and inject script, which requires a user to interact with the affected page.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:16:54Z"},"euvd":{"id":"EUVD-2026-25383","exploited":false,"provenance":"source"},"lineage":{"packageHistory":[{"cve":"CVE-2021-23368","published":"2021-04-12","fixed":"8.2.10","kev":false},{"cve":"CVE-2021-23382","published":"2021-04-26","fixed":"8.2.13","kev":false},{"cve":"CVE-2023-44270","published":"2023-09-29","fixed":"8.4.31","kev":false},{"cve":"CVE-2026-41305","published":"2026-04-24","fixed":"8.5.10","kev":false},{"cve":"CVE-2026-45623","published":"2026-07-27","fixed":"8.5.12","kev":false,"link":{"from":"CVE-2026-41305","to":"CVE-2026-45623","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"npm:postcss","fromFixed":"8.5.10","toFixed":"8.5.12","daysApart":94}]}},{"cve":"CVE-2026-73646","published":"2026-08-17","fixed":"8.5.18","kev":false},{"cve":"CVE-2026-69153","published":"2026-08-03","fixed":"8.5.23","kev":false}],"package":"npm:postcss"}}