What’s Vulnerable › Vulnerabilities
CVE-2026-41305: PostCSS has XSS via Unescaped </style> in its CSS Stringify Output
- Severity: medium (CVSS 6.1 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 0.2% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2026-04-24 · updated 2026-06-17
- Weakness: CWE-79
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 products
- Npm Postcss: before 8.5.10 — fixed in 8.5.10
- postcss: before 8.5.10
How to fix
Upgrade to a fixed version: Npm Postcss 8.5.10. Check the vendor advisory for mitigations.
References
- https://github.com/postcss/postcss/releases/tag/8.5.10
- https://github.com/postcss/postcss/security/advisories/GHSA-qx2v-qp2m-jg93
- https://github.com/postcss/postcss/security/advisories/GHSA-qx2v-qp2m-jg93
Get alerted when CVE-2026-41305 or the next vulnerability affects your stack