CVE-2026-9358: postcss-selector-parser allows denial of service through uncontrolled AST recursion
Low CVSS 4.3
- OSV id
- GHSA-w9m9-85wc-3x92
- Also known as
- CVE-2026-9358
- Published
- Last modified
Affected packages
| Package | Affected versions | Fixed in |
|---|---|---|
| postcss-selector-parser npm |
>= 6.1.0, < 6.1.3 | 6.1.3 |
| postcss-selector-parser npm |
>= 7.1.0, < 7.1.3 | 7.1.3 |
Versions we track that it affects: postcss-selector-parser 6.1.0; postcss-selector-parser 6.1.0
How to fix it
postcss-selector-parser (npm)
Upgrade postcss-selector-parser to 6.1.3 or later.
npm install postcss-selector-parser@6.1.3
# if it is an indirect dependency: npm update postcss-selector-parser (or npm audit fix)
- If it is an indirect dependency, upgrade the package that depends on it, or force the version with "overrides" (npm), "resolutions" (Yarn) or "pnpm.overrides" (pnpm) in package.json.
- Check the changelog for breaking changes (especially across major versions), update the lockfile with the package manager, and run your tests.
postcss-selector-parser (npm)
Upgrade postcss-selector-parser to 7.1.3 or later.
npm install postcss-selector-parser@7.1.3
# if it is an indirect dependency: npm update postcss-selector-parser (or npm audit fix)
- If it is an indirect dependency, upgrade the package that depends on it, or force the version with "overrides" (npm), "resolutions" (Yarn) or "pnpm.overrides" (pnpm) in package.json.
- Check the changelog for breaking changes (especially across major versions), update the lockfile with the package manager, and run your tests.
Not sure whether your project uses an affected version? Check your lockfile below for free.
Details
A vulnerability was determined in postcss-selector-parser before 6.1.3 and 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)."
References
- GHSA-w9m9-85wc-3x92 on OSV.dev
- Advisory: https://nvd.nist.gov/vuln/detail/CVE-2026-9358
- Web: https://github.com/postcss/postcss-selector-parser/commit/5bc698cef66f8abd12610dc623e5d67cbc0f869d
- Web: https://github.com/postcss/postcss-selector-parser/commit/e37c5b0b785b165e27508d2489fdec8e0f18b10a
- Web: https://gist.github.com/bx33661/581e3a38134601c04e19b4dfc9b459b9
- Package: https://github.com/postcss/postcss-selector-parser
- Web: https://github.com/postcss/postcss-selector-parser/releases/tag/6.1.3
- Web: https://github.com/postcss/postcss-selector-parser/releases/tag/7.1.3
- Web: https://vuldb.com/cve/CVE-2026-9358
- Web: https://vuldb.com/submit/813080
- Web: https://vuldb.com/vuln/365321
- Web: https://vuldb.com/vuln/365321/cti
Am I affected?
Upload or paste your lockfile. We check every package version in it against OSV.dev, this advisory included, and email you the vulnerable ones with the version that fixes them. Free, and no account needed.
About this data
Source: GitHub Advisory Database via OSV.dev (CC-BY 4.0). Severity comes from the advisory's own rating when it has one, else from its CVSS score.