XSS in Postcss

CVE-2026-41305

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.

Vulnerability class: XSS (Cross-Site Scripting)

EPSS: 0.002 (10.6th percentile) — read the EPSS interpretation.

CVSS v3 metric

CVSS v3 base score 6.1 (Medium). Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N.

Affected products

Weakness classification (CWE)

References

Frequently asked questions

What is CVE-2026-41305?
CVE-2026-41305 is a medium-severity vulnerability in Postcss, classified under Cross-site Scripting. CVSS score: 6.1/10. Published 2026-04-24.
How severe is CVE-2026-41305?
Medium severity. CVSS v3 base score is 6.1 out of 10.