CVE-2026-41305
CVE-2026-41305 · PostCSS has XSS via Unescaped </style> in its CSS Stringify Output
This page contains facts from public vulnerability sources. Check the original advisory before updating.
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.
CVSS 6.1 · Medium · EPSS 0.2% · Fix available
- Published
- Updated
Affected products and versions
postcss
- Versions
- < 8.5.10: Affected
No fix published
node-postcss Debian:12
- Versions
- 8.4.20+~cs8.0.23-1
- 8.4.20+~cs8.0.23-1+deb12u1
- 8.4.31+~cs8.0.26-1
- 8.4.39+~cs9.2.29-1
- 8.4.49+~cs9.2.32-1
- 8.5.12+~cs9.3.32-1
- 8.5.14+~cs9.3.34-1
- 8.5.15+~cs9.3.34-1
- 8.5.15+~cs9.3.38-1
- 8.5.15+~cs9.3.39-1
- 8.5.19+~cs10.2.23-1
- 8.5.21+~cs10.2.23-1
- 8.5.23+~cs10.2.23-1
- 8.5.25+~cs10.2.23-1
- 8.5.26+~cs10.2.24-1
- 8.5.28+~cs10.2.24-1
- 8.5.6+~cs9.3.28-1
- 8.5.8+~cs9.3.30-1
- 8.5.9+~cs9.3.30-1
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
node-postcss Debian:13
- Versions
- 8.4.49+~cs9.2.32-1
- 8.5.12+~cs9.3.32-1
- 8.5.14+~cs9.3.34-1
- 8.5.15+~cs9.3.34-1
- 8.5.15+~cs9.3.38-1
- 8.5.15+~cs9.3.39-1
- 8.5.19+~cs10.2.23-1
- 8.5.21+~cs10.2.23-1
- 8.5.23+~cs10.2.23-1
- 8.5.25+~cs10.2.23-1
- 8.5.26+~cs10.2.24-1
- 8.5.28+~cs10.2.24-1
- 8.5.6+~cs9.3.28-1
- 8.5.8+~cs9.3.30-1
- 8.5.9+~cs9.3.30-1
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
node-postcss Debian:14
- Versions
- 8.4.49+~cs9.2.32-1
- 8.5.6+~cs9.3.28-1
- 8.5.8+~cs9.3.30-1
- 8.5.9+~cs9.3.30-1
- Affected ranges
- ECOSYSTEM: < 8.5.12+~cs9.3.32-1
Update to 8.5.12+~cs9.3.32-1
postcss npm
- Affected ranges
- SEMVER: < 8.5.10
Update to 8.5.10
node-postcss Ubuntu:20.04:LTS
- Versions
- 6.0.23-1
- 6.0.23-3
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
node-postcss Ubuntu:22.04:LTS
- Versions
- 8.2.1+~cs5.3.23-8
- 8.4.5+~cs7.1.51-2
- 8.4.6+~cs7.3.21-1
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
node-postcss Ubuntu:24.04:LTS
- Versions
- 8.4.20+~cs8.0.23-1
- 8.4.31+~cs8.0.26-1
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
node-postcss Ubuntu:25.10
- Versions
- 8.4.49+~cs9.2.32-1
- 8.5.6+~cs9.3.28-1
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
node-postcss Ubuntu:26.10
- Versions
- 8.5.8+~cs9.3.30-1
- 8.5.15+~cs9.3.34-1
- 8.5.15+~cs9.3.38-1
- 8.5.15+~cs9.3.39-1build1
- 8.5.25+~cs10.2.23-1
- 8.5.26+~cs10.2.24-1
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
node-postcss Ubuntu:26.04:LTS
- Versions
- 8.5.6+~cs9.3.28-1
- 8.5.8+~cs9.3.30-1
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published