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.

Severity (CVSS 3.1)6.1Medium
Exploit odds (30 days)0.2%top 89.5% of all CVEs
Exploited in the wildNo reportsCISA SSVC: poc
Attack toolingNoneno public tooling known

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

EcosystemPackageFixed inAdvisory
Debian:12node-postcssno fix listedDEBIAN-CVE-2026-41305
Debian:13node-postcssno fix listedDEBIAN-CVE-2026-41305
Debian:14node-postcss8.5.12+~cs9.3.32-1DEBIAN-CVE-2026-41305
Ubuntu:22.04:LTSnode-postcssno fix listedUBUNTU-CVE-2026-41305
Ubuntu:24.04:LTSnode-postcssno fix listedUBUNTU-CVE-2026-41305
Ubuntu:25.10node-postcssno fix listedUBUNTU-CVE-2026-41305
Ubuntu:26.04:LTSnode-postcssno fix listedUBUNTU-CVE-2026-41305
Ubuntu:26.10node-postcssno fix listedUBUNTU-CVE-2026-41305
npmpostcss8.5.10GHSA-qx2v-qp2m-jg93

Affected products (as reported)

VendorProductVersions
postcss postcss < 8.5.10

Weakness: CWE-79 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

References