Skip to content

[GHSA-w9m9-85wc-3x92] A vulnerability was determined in postcss up to 7.1.1....#8003

Open
MoOx wants to merge 1 commit into
MoOx/advisory-improvement-8003from
MoOx-GHSA-w9m9-85wc-3x92
Open

[GHSA-w9m9-85wc-3x92] A vulnerability was determined in postcss up to 7.1.1....#8003
MoOx wants to merge 1 commit into
MoOx/advisory-improvement-8003from
MoOx-GHSA-w9m9-85wc-3x92

Conversation

@MoOx

@MoOx MoOx commented Jun 11, 2026

Copy link
Copy Markdown

Updates

  • Affected products
  • CVSS v3
  • CVSS v4
  • CWEs
  • Description
  • References
  • Severity
  • Source code location
  • Summary

Comments
I am the maintainer of postcss-selector-parser. This advisory is attributed to
the wrong package and lists no fixed version. Corrections:

  • Affected package is the npm package postcss-selector-parser, not postcss (the cited file src/selectors/container.js and version 7.1.1 are from this package; postcss core is on 8.x).
  • Patched versions: 7.1.3 (7.x line) and 6.1.3 (6.x LTS line).
  • Weakness is CWE-674 (Uncontrolled Recursion), not CWE-404.
  • Added an accurate description, references (fix PR, public PoC) and a valid
    CVSS vector.

Copilot AI 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.

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 summary and substantially expanded details with impact, patches, and workarounds.
  • Populated affected with 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"
}
]
}
]
}
],
@github-actions github-actions Bot changed the base branch from main to MoOx/advisory-improvement-8003 June 11, 2026 08:44
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.

2 participants