Vulnerability · Published Apr 24, 2026 · Assigned by GitHub_M
CVE-2026-41305PostCSS has XSS via Unescaped </style> in its CSS Stringify Output
Medium 6.1
In plain English
A medium-severity cross-site scripting in postcss from postcss. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 0.2% (higher than 11% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
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.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | node-postcss | no fix listed | DEBIAN-CVE-2026-41305 |
| Debian:13 | node-postcss | no fix listed | DEBIAN-CVE-2026-41305 |
| Debian:14 | node-postcss | 8.5.12+~cs9.3.32-1 | DEBIAN-CVE-2026-41305 |
| Ubuntu:22.04:LTS | node-postcss | no fix listed | UBUNTU-CVE-2026-41305 |
| Ubuntu:24.04:LTS | node-postcss | no fix listed | UBUNTU-CVE-2026-41305 |
| Ubuntu:25.10 | node-postcss | no fix listed | UBUNTU-CVE-2026-41305 |
| Ubuntu:26.04:LTS | node-postcss | no fix listed | UBUNTU-CVE-2026-41305 |
| Ubuntu:26.10 | node-postcss | no fix listed | UBUNTU-CVE-2026-41305 |
| npm | postcss | 8.5.10 | GHSA-qx2v-qp2m-jg93 |
Affected products (as reported)
Weakness: CWE-79 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
References
- https://github.com/postcss/postcss/security/advisories/GHSA-qx2v-qp2m-jg93 x_refsource_CONFIRM
- https://github.com/postcss/postcss/releases/tag/8.5.10 x_refsource_MISC