Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. postcss
  4. ›
  5. CVE-2026-41305

CVE-2026-41305: PostCSS has XSS via Unescaped </style> in its CSS Stringify Output

April 24, 2026

PostCSS v8.5.5 (latest) does 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.

References

  • github.com/advisories/GHSA-qx2v-qp2m-jg93
  • github.com/postcss/postcss
  • github.com/postcss/postcss/releases/tag/8.5.10
  • github.com/postcss/postcss/security/advisories/GHSA-qx2v-qp2m-jg93
  • nvd.nist.gov/vuln/detail/CVE-2026-41305

Code Behaviors & Features

Detect and mitigate CVE-2026-41305 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 8.5.10

Fixed versions

  • 8.5.10

Solution

Upgrade to version 8.5.10 or above.

Impact 6.1 MEDIUM

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

Learn more about CVSS

Weakness

  • CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Source file

npm/postcss/CVE-2026-41305.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sat, 25 Apr 2026 00:18:53 +0000.