# CVE-2026-9358: postcss-selector-parser AST Serialization container.js toString recursion

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 5.3
- **CVSS:** 5.3 (v4.0, CNA) `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`
- **CVSS metrics:** Attack vector: Network; Attack complexity: Low; Attack requirements: None; Privileges required: None; User interaction: Passive; Confidentiality impact: None; Integrity impact: None; Availability impact: Low; Confidentiality impact on other systems: None; Integrity impact on other systems: None; Availability impact on other systems: None; Exploit maturity: Proof of concept
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** Yes (see exploit references)
- **Remote exploitation:** Remote, no login needed
- **EPSS:** 0.58% (percentile 42, 2026-11-26)
- **CWE:** CWE-674, CWE-404
- **Aliases:** GHSA-w9m9-85wc-3x92
- **Published:** 2026-05-24T05:30:09.671Z
- **Modified:** 2026-09-10T03:50:47.767Z

## Who should check

- Projects that depend on npm package postcss-selector-parser (\>= 6.1.0, \< 6.1.3)
- Anyone running postcss-selector-parser 6.1.0; 6.1.1; 6.1.2; 7.1.0; 7.1.1; 7.1.2

## Description

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 and fixed versions

- npm `postcss-selector-parser`: affected \>= 6.1.0, \< 6.1.3; fixed 6.1.3, 7.1.3 (osv)
- postcss-selector-parser: 6.1.0; 6.1.1; 6.1.2; 7.1.0; 7.1.1; 7.1.2 (cvelist)

## Mitigation

- Upgrade postcss-selector-parser to one of 6.1.3, 7.1.3 (or later in the same release line).

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-9358. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-9358.md
Affected: postcss-selector-parser >= 6.1.0, < 6.1.3
Fixed in: 6.1.3, 7.1.3

Steps:
1. Search this machine and project for postcss-selector-parser (npm), postcss-selector-parser: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-9358 being exploited?

There is no confirmed exploitation: CVE-2026-9358 is not in the CISA Known Exploited Vulnerabilities catalog. Public exploit code or a proof of concept is available. EPSS estimates a 0.58% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2026-9358?

Medium: CVSS 5.3 (v4.0, scored by CNA). Remote, no login needed. A user has to take an action, such as opening a link, for the attack to work.

### Which versions are affected by CVE-2026-9358?

postcss-selector-parser \>= 6.1.0, \< 6.1.3.

### Is there a fix for CVE-2026-9358?

Yes. Fixed in 6.1.3, 7.1.3. Upgrade postcss-selector-parser to one of 6.1.3, 7.1.3 (or later in the same release line).

### How do I check if I'm affected by CVE-2026-9358?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://nvd.nist.gov/vuln/detail/CVE-2026-9358>
- patch: <https://github.com/postcss/postcss-selector-parser/commit/5bc698cef66f8abd12610dc623e5d67cbc0f869d>
- patch: <https://github.com/postcss/postcss-selector-parser/releases/tag/7.1.3>
- patch: <https://github.com/postcss/postcss-selector-parser/commit/e37c5b0b785b165e27508d2489fdec8e0f18b10a>
- exploit: <https://gist.github.com/bx33661/581e3a38134601c04e19b4dfc9b459b9>
- article: <https://vuldb.com/vuln/365321>
- other: <https://vuldb.com/vuln/365321/cti>
- other: <https://vuldb.com/cve/CVE-2026-9358>
- other: <https://vuldb.com/submit/813080>
- other: <https://github.com/postcss/postcss-selector-parser>
- other: <https://github.com/postcss/postcss-selector-parser/releases/tag/6.1.3>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-9358>
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GHSA-w9m9-85wc-3x92> (license: <https://creativecommons.org/licenses/by/4.0/>)

HTML: <https://flawdb.com/CVE-2026-9358> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-9358>
