Skip to content

Update dependency postcss to v8.5.10 [SECURITY]#19

Open
renovate-bot wants to merge 1 commit into
X-oss-byte:mainfrom
renovate-bot:renovate/npm-postcss-vulnerability
Open

Update dependency postcss to v8.5.10 [SECURITY]#19
renovate-bot wants to merge 1 commit into
X-oss-byte:mainfrom
renovate-bot:renovate/npm-postcss-vulnerability

Conversation

@renovate-bot
Copy link
Copy Markdown

@renovate-bot renovate-bot commented Feb 26, 2024

This PR contains the following updates:

Package Change Age Confidence
postcss (source) 8.4.278.5.10 age confidence

PostCSS line return parsing error

CVE-2023-44270 / GHSA-7fh5-64p2-3v2j

More information

Details

An issue was discovered in PostCSS before 8.4.31. It affects linters using PostCSS to parse external Cascading Style Sheets (CSS). There may be \r discrepancies, as demonstrated by @font-face{ font:(\r/*);} in a rule.

This vulnerability affects linters using PostCSS to parse external untrusted CSS. An attacker can prepare CSS in such a way that it will contains parts parsed by PostCSS as a CSS comment. After processing by PostCSS, it will be included in the PostCSS output in CSS nodes (rules, properties) despite being originally included in a comment.

Severity

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

References

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


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

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

v8.4.41

Compare Source

v8.4.40

Compare Source

  • Moved to getter/setter in nodes types to help Sass team (by @​nex3).

v8.4.39

Compare Source

v8.4.38

Compare Source

v8.4.37

Compare Source

  • Fixed original.column are not numbers error in another case.

v8.4.36

Compare Source

  • Fixed original.column are not numbers error on broken previous source map.

v8.4.35

Compare Source

  • Avoid ! in node.parent.nodes type.
  • Allow to pass undefined to node adding method to simplify types.

v8.4.34

Compare Source

  • Fixed AtRule#nodes type (by Tim Weißenfels).
  • Cleaned up code (by Dmitry Kirillov).

v8.4.33

Compare Source

  • Fixed NoWorkResult behavior difference with normal mode (by Romain Menke).
  • Fixed NoWorkResult usage conditions (by @​ahmdammarr).

v8.4.32

Compare Source

  • Fixed postcss().process() types (by Andrew Ferreira).

v8.4.31

Compare Source

v8.4.30

Compare Source

  • Improved source map performance (by Romain Menke).

v8.4.29

Compare Source

  • Fixed Node#source.offset (by Ido Rosenthal).
  • Fixed docs (by Christian Oliff).

v8.4.28

Compare Source

  • Fixed Root.source.end for better source map (by Romain Menke).
  • Fixed Result.root types when process() has no parser.

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.

@bolt-new-by-stackblitz
Copy link
Copy Markdown

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@vercel
Copy link
Copy Markdown

vercel Bot commented Feb 26, 2024

Someone is attempting to deploy a commit to a Personal Account owned by @X-oss-byte on Vercel.

@X-oss-byte first needs to authorize it.

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Feb 26, 2024

⚠️ No Changeset found

Latest commit: e1cf619

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Copy Markdown

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

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

PR Type: Enhancement

PR Summary: This pull request updates the postcss package from version 8.4.27 to 8.4.31. This update addresses a security vulnerability identified as CVE-2023-44270, which affects the parsing of characters in CSS, potentially leading to the inclusion of parts of the CSS intended as comments in the PostCSS output. The update ensures that postcss and all related dependencies within the project are aligned with the patched version, mitigating the risk associated with the vulnerability.

Decision: Comment

📝 Type: 'Enhancement' - not supported yet.
  • Sourcery currently only approves 'Typo fix' PRs.
✅ Issue addressed: this change correctly addresses the issue or implements the desired feature.
No details provided.
✅ Small diff: the diff is small enough to approve with confidence.
No details provided.

General suggestions:

  • Ensure thorough testing of CSS processing within the application to verify that the update does not introduce any regressions.
  • Consider setting up automated dependency update tools, if not already in place, to promptly address future security vulnerabilities.
  • Review other dependencies for potential security vulnerabilities and update them as necessary.

Thanks for using Sourcery. We offer it for free for open source projects and would be very grateful if you could help us grow. If you like it, would you consider sharing Sourcery on your favourite social media? ✨

Share Sourcery

Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.

@renovate-bot renovate-bot force-pushed the renovate/npm-postcss-vulnerability branch from ccf7303 to 232af48 Compare January 24, 2025 07:26
@renovate-bot renovate-bot force-pushed the renovate/npm-postcss-vulnerability branch 2 times, most recently from 1860338 to db17405 Compare March 17, 2025 23:50
@renovate-bot renovate-bot force-pushed the renovate/npm-postcss-vulnerability branch from db17405 to 8c8abc8 Compare April 3, 2025 03:33
@renovate-bot renovate-bot force-pushed the renovate/npm-postcss-vulnerability branch from 8c8abc8 to 8fce553 Compare June 8, 2025 12:15
@renovate-bot renovate-bot force-pushed the renovate/npm-postcss-vulnerability branch from 8fce553 to 2e96356 Compare July 20, 2025 12:12
@renovate-bot renovate-bot force-pushed the renovate/npm-postcss-vulnerability branch 4 times, most recently from f72e973 to 6152e3b Compare August 12, 2025 23:34
@renovate-bot renovate-bot force-pushed the renovate/npm-postcss-vulnerability branch from 6152e3b to c4b0d58 Compare August 16, 2025 11:01
@renovate-bot renovate-bot force-pushed the renovate/npm-postcss-vulnerability branch 3 times, most recently from c9c67f1 to e329972 Compare September 7, 2025 07:06
@renovate-bot renovate-bot force-pushed the renovate/npm-postcss-vulnerability branch 2 times, most recently from 9f9edda to 4cc34d8 Compare September 14, 2025 20:12
@renovate-bot renovate-bot force-pushed the renovate/npm-postcss-vulnerability branch 3 times, most recently from a7c3107 to b9fbf84 Compare September 22, 2025 11:44
@renovate-bot renovate-bot force-pushed the renovate/npm-postcss-vulnerability branch 3 times, most recently from 488b3f3 to dbeef8f Compare October 5, 2025 03:13
@renovate-bot renovate-bot force-pushed the renovate/npm-postcss-vulnerability branch from dbeef8f to 7d1eae7 Compare October 9, 2025 02:44
@renovate-bot renovate-bot force-pushed the renovate/npm-postcss-vulnerability branch from 7d1eae7 to 4fb5a7e Compare May 1, 2026 08:56
@renovate-bot renovate-bot changed the title Update dependency postcss to v8.4.31 [SECURITY] Update dependency postcss to v8.5.10 [SECURITY] May 30, 2026
@renovate-bot renovate-bot force-pushed the renovate/npm-postcss-vulnerability branch from 4fb5a7e to e1cf619 Compare May 30, 2026 07:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant