Skip to content

Update dependency postcss to v8.5.10 [SECURITY] - #2500

Merged
Onibenjo merged 1 commit into
mainfrom
renovate/npm-postcss-vulnerability
May 25, 2026
Merged

Update dependency postcss to v8.5.10 [SECURITY]#2500
Onibenjo merged 1 commit into
mainfrom
renovate/npm-postcss-vulnerability

Conversation

@renovate

@renovate renovate Bot commented Apr 30, 2026

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
postcss (source) 8.5.68.5.10 age adoption passing 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).

v8.5.9

Compare Source

  • Speed up source map encoding paring in case of the error.

v8.5.8

Compare Source

  • Fixed Processor#version.

v8.5.7

Compare Source

  • Improved source map annotation cleaning performance (by CodeAnt AI).

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 is behind base branch, 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.

@codecov

codecov Bot commented Apr 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.65%. Comparing base (8229719) to head (d931d09).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2500   +/-   ##
=======================================
  Coverage   78.65%   78.65%           
=======================================
  Files          16       16           
  Lines        1940     1940           
=======================================
  Hits         1526     1526           
  Misses        414      414           
Flag Coverage Δ
python 78.65% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@renovate renovate Bot changed the title chore(deps): update dependency postcss to v8.5.10 [security] Update dependency postcss to v8.5.10 [SECURITY] Apr 30, 2026
@renovate
renovate Bot force-pushed the renovate/npm-postcss-vulnerability branch 10 times, most recently from cb7b1ea to 200a7c3 Compare May 6, 2026 10:47
@renovate renovate Bot changed the title Update dependency postcss to v8.5.10 [SECURITY] chore(deps): update dependency postcss to v8.5.10 [security] May 6, 2026
@renovate
renovate Bot force-pushed the renovate/npm-postcss-vulnerability branch 6 times, most recently from 5587493 to b85f00b Compare May 11, 2026 11:19
@renovate
renovate Bot force-pushed the renovate/npm-postcss-vulnerability branch 8 times, most recently from 29e751a to 87d63e1 Compare May 21, 2026 08:35
@renovate renovate Bot changed the title chore(deps): update dependency postcss to v8.5.10 [security] Update dependency postcss to v8.5.10 [SECURITY] May 22, 2026
@renovate
renovate Bot force-pushed the renovate/npm-postcss-vulnerability branch 2 times, most recently from 9aa8563 to 345d914 Compare May 22, 2026 12:37
@renovate
renovate Bot force-pushed the renovate/npm-postcss-vulnerability branch from 345d914 to 22f7c09 Compare May 23, 2026 15:00
@renovate
renovate Bot force-pushed the renovate/npm-postcss-vulnerability branch from 22f7c09 to d931d09 Compare May 25, 2026 06:43

@Onibenjo Onibenjo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Onibenjo
Onibenjo merged commit 1743f86 into main May 25, 2026
15 checks passed
@Onibenjo
Onibenjo deleted the renovate/npm-postcss-vulnerability branch May 25, 2026 09:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant