[GHSA-w9m9-85wc-3x92] A vulnerability was determined in postcss up to 7.1.1....#8003
Open
MoOx wants to merge 1 commit into
Open
[GHSA-w9m9-85wc-3x92] A vulnerability was determined in postcss up to 7.1.1....#8003MoOx wants to merge 1 commit into
MoOx wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Expands and corrects the advisory metadata for CVE-2026-9358 in postcss-selector-parser, adding a clearer summary, detailed technical description, affected version ranges, and updated scoring/classification.
Changes:
- Added a new
summaryand substantially expandeddetailswith impact, patches, and workarounds. - Populated
affectedwith npm package ranges for the fixed versions in 6.x and 7.x. - Updated CVSS scoring to CVSS v4, added upstream references, and corrected CWE/severity classification.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| ], | ||
| "details": "A vulnerability was determined in postcss up to 7.1.1. Affected is the function toString of the file src/selectors/container.js of the component AST Serialization. Executing a manipulation can lead to uncontrolled recursion. It is possible to launch the attack remotely. The exploit has been publicly disclosed and may be utilized. The vendor explains, that according to his definition \"DoS on server-side on user-generated CSS is low risk for us (since most users compile own CSS with PostCSS).\"", | ||
| "summary": "Uncontrolled recursion in postcss-selector-parser parsing and serialization (stack overflow / denial of service)", | ||
| "details": "A vulnerability was determined in postcss-selector-parser up to 7.1.1. Affected is the function toString of the file src/selectors/container.js of the component AST Serialization. Executing a manipulation can lead to uncontrolled recursion. It is possible to launch the attack remotely. The exploit has been publicly disclosed and may be utilized. The vendor explains, that according to his definition \"DoS on server-side on user-generated CSS is low risk for us (since most users compile own CSS with PostCSS).\"\n\n### Summary\n`postcss-selector-parser` walks the selector AST recursively when parsing a\nselector and when traversing, cloning or serializing it. A selector with\nextreme nesting of functional pseudo-classes (e.g. thousands of nested\n`:not(...)`, `:is(...)`, `:where(...)`) recurses deeply enough to exhaust the\ncall stack and throw `RangeError: Maximum call stack size exceeded`. When such\ninput is parsed from an untrusted source, this is a denial-of-service vector.\n\n### Affected functionality\n- Parsing: `process`, `processSync`, `ast`, `astSync`, `transform`, `transformSync`\n- Serialization: `Root` / `Container` / `Pseudo` `toString()`\n- Traversal & cloning: `Container#walk`, `Node#clone`\n\n### Impact\nDenial of service (uncontrolled recursion → stack overflow). The only\nattacker-controlled input is the selector string. The library is most commonly\nused as a build-time tool on trusted, first-party CSS, which limits real-world\nexposure; the risk applies when untrusted selectors are parsed at runtime.\n\n### Patches\nFixed by bounding the maximum selector nesting depth (default 256), which raises\na catchable `Error` instead of overflowing the stack. A configurable\n`maxNestingDepth` parser option is also provided.\n- 7.x: fixed in **7.1.3**\n- 6.x: fixed in **6.1.3**\n\n### Workarounds\nDo not parse untrusted selector strings, or limit input nesting depth before\nparsing.", |
Comment on lines
+17
to
56
| "affected": [ | ||
| { | ||
| "package": { | ||
| "ecosystem": "npm", | ||
| "name": "postcss-selector-parser" | ||
| }, | ||
| "ranges": [ | ||
| { | ||
| "type": "ECOSYSTEM", | ||
| "events": [ | ||
| { | ||
| "introduced": "0" | ||
| }, | ||
| { | ||
| "fixed": "6.1.3" | ||
| } | ||
| ] | ||
| } | ||
| ] | ||
| }, | ||
| { | ||
| "type": "CVSS_V4", | ||
| "score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N/E:P/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X" | ||
| "package": { | ||
| "ecosystem": "npm", | ||
| "name": "postcss-selector-parser" | ||
| }, | ||
| "ranges": [ | ||
| { | ||
| "type": "ECOSYSTEM", | ||
| "events": [ | ||
| { | ||
| "introduced": "7.0.0" | ||
| }, | ||
| { | ||
| "fixed": "7.1.3" | ||
| } | ||
| ] | ||
| } | ||
| ] | ||
| } | ||
| ], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Updates
Comments
I am the maintainer of postcss-selector-parser. This advisory is attributed to
the wrong package and lists no fixed version. Corrections:
postcss-selector-parser, notpostcss(the cited file src/selectors/container.js and version 7.1.1 are from this package; postcss core is on 8.x).CVSS vector.