Skip to content

Bump dependency postcss to v8.5.10 [SECURITY]#514

Merged
uhafner merged 1 commit into
mainfrom
renovate/npm-postcss-vulnerability
Apr 26, 2026
Merged

Bump dependency postcss to v8.5.10 [SECURITY]#514
uhafner merged 1 commit into
mainfrom
renovate/npm-postcss-vulnerability

Conversation

@renovate
Copy link
Copy Markdown
Contributor

@renovate renovate Bot commented Apr 24, 2026

This PR contains the following updates:

Package Change Age Confidence
postcss (source) 8.5.98.5.10 age confidence

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

CVE-2026-41305 / GHSA-qx2v-qp2m-jg93

More information

Details

PostCSS: XSS via Unescaped </style> in CSS Stringify Output
Summary

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.

Proof of Concept
const postcss = require('postcss');

// Parse user CSS and re-stringify for page embedding
const userCSS = 'body { content: "</style><script>alert(1)</script><style>"; }';
const ast = postcss.parse(userCSS);
const output = ast.toResult().css;
const html = `<style>${output}</style>`;

console.log(html);
// <style>body { content: "</style><script>alert(1)</script><style>"; }</style>
//
// Browser: </style> closes the style tag, <script> executes

Tested output (Node.js v22, postcss v8.5.5):

Input: body { content: "</style><script>alert(1)</script><style>"; }
Output: body { content: "</style><script>alert(1)</script><style>"; }
Contains </style>: true
Impact

Impact non-bundler use cases since bundlers for XSS on their own. Requires some PostCSS plugin to have malware code, which can inject XSS to website.

Suggested Fix

Escape </style in all stringified output values:

output = output.replace(/<\/(style)/gi, '<\\/$1');
Credits

Discovered and reported by Sunil Kumar (@​TharVid)

Severity

  • CVSS Score: 6.1 / 10 (Medium)
  • Vector String: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

References

This data is provided by the GitHub Advisory Database (CC-BY 4.0).


Release Notes

postcss/postcss (postcss)

v8.5.10

Compare Source

  • Fixed XSS via unescaped </style> in non-bundler cases (by @​TharVid).

Configuration

📅 Schedule: (UTC)

  • Branch creation
    • ""
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate Bot added the dependencies Update of dependencies label Apr 24, 2026
@github-actions github-actions Bot requested a review from uhafner April 24, 2026 20:59
@github-actions
Copy link
Copy Markdown

☀️   Quality Monitor

Tests

   🚀   Integration Tests: ✅ successful — 10 passed
   ⛔   Architecture Tests: ✅ successful — 15 passed

Coverage for New Code

   〰️   Line Coverage: 100.00% — perfect 🎉
   ➰   Branch Coverage: 100.00% — perfect 🎉

Coverage for Whole Project

   〰️   Line Coverage: 84.21% — 3 missed lines
   ➰   Branch Coverage: 100.00% — perfect 🎉

Style

   CheckStyle   CheckStyle: No warnings
   PMD   PMD: No warnings
   ☕   Java Compiler: No warnings

Bugs

   SpotBugs   SpotBugs: No bugs
   🐛   Error Prone: No bugs

API Problems

   🚫   Revapi: No warnings

Vulnerabilities

   🛡️   OWASP Dependency Check: 207 vulnerabilities — error: 17, high: 54, normal: 125, low: 11

Software Metrics

   🌀   Cyclomatic Complexity: 8 (total)
   💭   Cognitive Complexity: 0 (total)
   ➿   N-Path Complexity: 8 (total)
   📏   Lines of Code: 104 (total)
   📝   Non Commenting Source Statements: 25 (total)
   🔗   Class Cohesion: 6.67% (maximum)
   ⚖️   Weight of Class: 20.00% (maximum)

🚦 Quality Gates

Overall Status: ✅ SUCCESS

✅ Passed Gates

  • ✅ Overall Tests Success Rate: 100.00 >= 100.00
  • ✅ Potential Bugs in Whole Project: 0.00 <= 0.00
  • ✅ Style Violation in Whole Project: 0.00 <= 0.00

Created by Quality Monitor v4.11.0 (#484bbba). More details are shown in the GitHub Checks Result.

@uhafner uhafner merged commit b187d6d into main Apr 26, 2026
33 checks passed
@uhafner uhafner deleted the renovate/npm-postcss-vulnerability branch April 26, 2026 06:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Update of dependencies

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant