CVE-2026-9358 — postcss-selector-parser
Fix: postcss/postcss-selector-parser@5bc698cCVE-2026-9358 is a CWE-404 vulnerability in postcss-selector-parser. A fix is available for postcss-selector-parser — see the affected versions and patch details below.
postcss-selector-parser AST Serialization container.js toString recursion
Exploitation Status
Proof-of-concept exploit code exists
- CISA’s SSVC triage found public proof-of-concept exploit code for this CVE, though no confirmed active exploitation.
Exploitation and automatability from CISA’s SSVC triage for CVE-2026-9358.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
Real-World Exposure
How broadly this vulnerability is actually deployed: weekly install volume shows current usage, and reverse-dependency count shows how many other packages break if it stays unpatched.
postcss-selector-parsernpmDescription
A vulnerability was determined in postcss-selector-parser up to 6.1.2/7.1.2. 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. Upgrading to version 6.1.3 and 7.1.3 is able to address this issue. This patch is called 5bc698cef66f8abd12610dc623e5d67cbc0f869d. It is suggested to upgrade the affected component. 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)." The commits were backported to 6.x branch, which was the most downloaded version.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 📦npm | postcss-selector-parser | ≥ 6.1.0&&< 6.1.3 | 6.1.3npm install postcss-selector-parser@6.1.3 |
| 📦npm | postcss-selector-parser | ≥ 7.1.0&&< 7.1.3 | 7.1.3npm install postcss-selector-parser@7.1.3 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for postcss-selector-parser, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update postcss-selector-parser to 6.1.3 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2026-9358 is resolved across your whole dependency graph.
Workarounds
Cap what an attacker can consume: apply request size, rate and timeout limits in front of the affected component, and run it with memory and CPU limits so exhaustion degrades one worker rather than the whole service.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
Moderate: This flaw in Postcss can lead to a denial of service (DoS) in applications that process untrusted CSS. The vulnerability arises from uncontrolled recursion in the AST Serialization component when handling specially crafted CSS. Exploitation requires user interaction, such as submitting attacker-controlled…
Upgrade to PostCSS 8.5.6 or later. As a workaround, validate and sanitize CSS input before processing with PostCSS to prevent deeply nested or malicious structures from reaching the serializer.Source: Red Hat security advisory for CVE-2026-9358 (CC BY 4.0)
| Product | Fixed in | Advisory |
|---|---|---|
| Red Hat Hardened Images | rust-main-1.96.0-1.hum1 | RHSA-2026:22934 |
| Red Hat Openshift Data Foundation 4.18 | odf4/cephcsi-rhel9:1786705347 | RHSA-2026:56431 |
| Red Hat Openshift Data Foundation 4.22 | odf4/cephcsi-rhel9:1787057250 | RHSA-2026:56928 |
Frequently Asked Questions
Is CVE-2026-9358 in your dependencies?
Find it across npm, including transitive dependencies.