CVE-2026-41305

PostCSS has XSS via Unescaped </style> in its CSS Stringify Output

Published Apr 24, 2026 CVSS 3.1 · 6.1 Medium EPSS < 1% KEV · Not listed
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.

Remediation

No solution or workaround provided in the CVE record

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-qx2v-qp2m-jg93 PostCSS has XSS via Unescaped </style> in its CSS Stringify Output
History
Type Values Removed Values Added
First Time appeared Postcss
Postcss postcss
Vendors & Products Postcss
Postcss postcss
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
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.
Title PostCSS has XSS via Unescaped </style> in its CSS Stringify Output
Weaknesses CWE-79
References
Metrics cvssV3_1

{'score': 6.1, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N'}

Weaknesses

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Apr 24, 2026, 4:23 PM
Reserved
Apr 20, 2026, 2:01 PM
Status
Deferred
Published
Apr 24, 2026, 3:16 AM
Modified
Jun 17, 2026, 10:46 AM
Severity
Moderate
Public date
Apr 24, 2026, 2:27 AM