Skip to content

chore(renovate): Security update Update dependency postcss [SECURITY] - #458

Open
renovate[bot] wants to merge 1 commit into
developmentfrom
renovate/npm-postcss-vulnerability
Open

chore(renovate): Security update Update dependency postcss [SECURITY]#458
renovate[bot] wants to merge 1 commit into
developmentfrom
renovate/npm-postcss-vulnerability

Conversation

@renovate

@renovate renovate Bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Change Age Confidence
postcss (source) 8.4.418.5.10 age confidence
postcss (source) ^8^8.5.28 age confidence
postcss (source) 8.4.478.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).

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).

v8.5.6

Compare Source

  • Fixed ContainerWithChildren type discriminating (by @​Goodwine).

v8.5.5

Compare Source

  • Fixed package.jsonexports compatibility with some tools (by @​JounQin).

v8.5.4

Compare Source

v8.5.3

Compare Source

v8.5.2

Compare Source

v8.5.1

Compare Source

  • Fixed declaration parsing performance (by @​homanp).

v8.5.0: 8.5 “Duke Alloces”

Compare Source

President Alloces seal

PostCSS 8.5 brought API to work better with non-CSS sources like HTML, Vue.js/Svelte sources or CSS-in-JS.

@​romainmenke during his work on Stylelint added Input#document in additional to Input#css.

root.source.input.document //=> "<p>Hello</p>
                           //    <style>
                           //    p {
                           //      color: green;
                           //    }
                           //    </style>"
root.source.input.css      //=> "p {
                           //      color: green;
                           //    }"

Thanks to Sponsors

This release was possible thanks to our community.

If your company wants to support the sustainability of front-end infrastructure or wants to give some love to PostCSS, you can join our supporters by:

v8.4.49

Compare Source

v8.4.48

Compare Source

  • Fixed position calculation in error/warnings methods (by @​romainmenke).

v8.4.47

Compare Source

  • Removed debug code.

v8.4.46

Compare Source

  • Fixed Cannot read properties of undefined (reading 'before').

v8.4.45

Compare Source

  • Removed unnecessary fix which could lead to infinite loop.

v8.4.44

Compare Source

  • Another way to fix markClean is not a function error.

v8.4.43

Compare Source

  • Fixed markClean is not a function error.

v8.4.42

Compare Source

  • Fixed CSS syntax error on long minified files (by @​varpstar).

Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • 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.

👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.


  • 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 renovate-bot Renovate PR label Aug 26, 2026
@vercel

vercel Bot commented Aug 26, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
nexeraid-example-airdrop-v2 Ready Ready Preview Sep 10, 2026 3:54pm UTC
nexeraid-examples-v2 Ready Ready Preview Sep 10, 2026 3:54pm UTC
thea-examples Error Error Sep 10, 2026 3:54pm UTC

Request Review

@renovate
renovate Bot force-pushed the renovate/npm-postcss-vulnerability branch from 9b7ad48 to f6472d1 Compare August 27, 2026 01:42
@renovate renovate Bot changed the title chore(renovate): Security update Update dependency postcss [SECURITY] chore(renovate): Security update Update dependency postcss to v8.5.10 [SECURITY] Aug 27, 2026
@renovate
renovate Bot force-pushed the renovate/npm-postcss-vulnerability branch from f6472d1 to 98b06a3 Compare September 2, 2026 20:43
@renovate renovate Bot changed the title chore(renovate): Security update Update dependency postcss to v8.5.10 [SECURITY] chore(renovate): Security update Update dependency postcss [SECURITY] Sep 2, 2026
@renovate
renovate Bot force-pushed the renovate/npm-postcss-vulnerability branch from 98b06a3 to 40ad954 Compare September 3, 2026 04:07
@renovate renovate Bot changed the title chore(renovate): Security update Update dependency postcss [SECURITY] chore(renovate): Security update Update dependency postcss to v8.5.10 [SECURITY] Sep 3, 2026
@renovate
renovate Bot force-pushed the renovate/npm-postcss-vulnerability branch from 40ad954 to c19bd3a Compare September 3, 2026 17:59
@renovate renovate Bot changed the title chore(renovate): Security update Update dependency postcss to v8.5.10 [SECURITY] chore(renovate): Security update Update dependency postcss [SECURITY] Sep 3, 2026
@renovate renovate Bot changed the title chore(renovate): Security update Update dependency postcss [SECURITY] chore(renovate): Security update Update dependency postcss to v8.5.10 [SECURITY] Sep 4, 2026
@renovate
renovate Bot force-pushed the renovate/npm-postcss-vulnerability branch from b9854c5 to f562c9a Compare September 8, 2026 00:07
@renovate renovate Bot changed the title chore(renovate): Security update Update dependency postcss to v8.5.10 [SECURITY] chore(renovate): Security update Update dependency postcss [SECURITY] Sep 8, 2026
@renovate
renovate Bot force-pushed the renovate/npm-postcss-vulnerability branch from f562c9a to 471dd84 Compare September 8, 2026 04:52
@renovate renovate Bot changed the title chore(renovate): Security update Update dependency postcss [SECURITY] chore(renovate): Security update Update dependency postcss to v8.5.10 [SECURITY] Sep 8, 2026
@renovate
renovate Bot force-pushed the renovate/npm-postcss-vulnerability branch from 471dd84 to 9663abf Compare September 9, 2026 23:36
@renovate renovate Bot changed the title chore(renovate): Security update Update dependency postcss to v8.5.10 [SECURITY] chore(renovate): Security update Update dependency postcss [SECURITY] Sep 9, 2026
@renovate
renovate Bot force-pushed the renovate/npm-postcss-vulnerability branch from 9663abf to c970af7 Compare September 10, 2026 04:24
@renovate renovate Bot changed the title chore(renovate): Security update Update dependency postcss [SECURITY] chore(renovate): Security update Update dependency postcss to v8.5.10 [SECURITY] Sep 10, 2026
See associated pull request for more information.
@renovate
renovate Bot force-pushed the renovate/npm-postcss-vulnerability branch from c970af7 to 65a9746 Compare September 10, 2026 15:53
@renovate renovate Bot changed the title chore(renovate): Security update Update dependency postcss to v8.5.10 [SECURITY] chore(renovate): Security update Update dependency postcss [SECURITY] Sep 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

renovate-bot Renovate PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant