PostCSS: Quadratic complexity in flat selector parsing allows CPU exhaustion
CVE-2026-104844GHSA-rj75-hqrm-r3gf
What to do
Vendor fix available. Upgrade each affected package to the fixed version on its release line (postcss-selector-parser 7.1.6, 6.1.5), redeploy, then verify what is actually installed.
This page has no inventory attached, so it cannot say whether you are affected. A vendor fix is not proof that your deployment is fixed.
Affected packages
- Affected
- >= 7.0.0, < 7.1.6< 6.1.5
- Fixed in
- 6.1.5, 7.1.6
Sources
- GitHub Advisory Database and maintainer security advisories on GitHub
GitHub-reviewed advisory GHSA-rj75-hqrm-r3gf lists affected ranges: npm postcss-selector-parser >=0 <7.1.6
VerifiedObserved Structured GitHub Advisory Database record (type=reviewed) from the GitHub REST API.
- Open Source Vulnerabilities (OSV.dev), including the GitHub Advisory Database
OSV record GHSA-rj75-hqrm-r3gf lists affected ranges: npm postcss-selector-parser >=0 <7.1.6 (fixed)
VerifiedObserved Structured OSV record; GitHub-reviewed advisory.
- GitHub Advisory Database and maintainer security advisories on GitHub
GitHub-reviewed advisory GHSA-rj75-hqrm-r3gf lists affected ranges: npm postcss-selector-parser >=7.0.0 =0 <6.1.5
VerifiedObserved Structured GitHub Advisory Database record (type=reviewed) from the GitHub REST API.
- Open Source Vulnerabilities (OSV.dev), including the GitHub Advisory Database
OSV record GHSA-rj75-hqrm-r3gf lists affected ranges: npm postcss-selector-parser >=7.0.0 =0 <6.1.5 (fixed)
VerifiedObserved Structured OSV record; GitHub-reviewed advisory.
Severity and exploitation
- Exploitation
- No confirmed exploitation recorded. Patch Next marks exploitation only from CISA KEV.
- CVSS
- 5.9 · CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
- EPSS
- CVE-2026-104844: 0.39% estimated exploitation activity in the next 30 days; percentile 33.03 (FIRST EPSS, 2026-11-03). This is a model estimate, not proof of exploitation or customer exposure.
Source description
As published by the source; long descriptions are shortened.
Impact `.` and `#` are not word delimiters in the tokenizer, so a flat selector such as `.a.a.a...` reaches `splitWord()` as a single word token carrying n class or id indexes. Three passes scanned those index arrays linearly for every index, making the parse O(n^2) in the number of indexes rather than in input length: `uniqs()`, the `indices.forEach` loop, and the Sass-interpolation filter. Parsing a 400 KB flat selector took ~34 s on a modern laptop, fully occupying a single thread. A benign selector of identical byte size parses in tens of milliseconds, so the cost is driven by the index count, not the input size. The nesting depth of such a selector is 0, so the `maxNestingDepth` guard added in 7.1.3 offers no protection. Reachability is deployment dependent. Only consumers that parse untrusted, attacker-supplied selectors synchronously in a request path are exposed, for example CSS sanitizers, CSS-in-JS services and online playgrounds. Ordinary build-time use on trusted…
Dates and revisions
- Published by the source
- Last modified by the source
- Source last checked
- Revision 5 · amended ·
Amended from osv record GHSA-rj75-hqrm-r3gf
- Revision 4 · amended ·
Amended from ghsa record GHSA-rj75-hqrm-r3gf
- Revision 3 · amended ·
Amended from ghsa record GHSA-rj75-hqrm-r3gf
- Revision 2 · amended ·
Amended from osv record GHSA-rj75-hqrm-r3gf
- Revision 1 · created ·
Published from ghsa record GHSA-rj75-hqrm-r3gf
Agent brief
Preview the exact text before you copy it. Commands are read-only suggestions; review them before running anything.
# Patch Next advisory brief: CVE-2026-104844 Advisory: PostCSS: Quadratic complexity in flat selector parsing allows CPU exhaustion IDs: CVE-2026-104844, GHSA-rj75-hqrm-r3gf Record: https://patchnext.com/advisories/cve-2026-104844 (revision 5, source checked 27 Oct 2026, 06:00 UTC) Inventory: none attached. This brief comes from a public page and does not say whether any deployment is affected. Severity: Medium (CVSS 5.9) Exploitation: no confirmed exploitation recorded. Patch Next confirms exploitation only from CISA KEV. Vendor response: Vendor fix available; fixed versions by package: postcss-selector-parser 7.1.6, 6.1.5. A vendor fix does not mean a deployment is fixed. ## Affected components - npm postcss-selector-parser: affected >= 7.0.0, < 7.1.6; < 6.1.5; fixed in 6.1.5, 7.1.6 ## Suggested inspection (read-only) - `npm ls postcss-selector-parser --all`: lists every installed copy and version, including transitive ones. Run in the project root after `npm ci`. ## Supported action Upgrade each affected component to a fixed version on its release line. For a transitive dependency, upgrade the parent package or add an override or constraint, then regenerate the lockfile. Redeploy every environment that ran an affected version. ## Required regression checks - Run the test suite and a production build. - Exercise the features that depend on postcss-selector-parser. - Repeat the inspection and confirm that only fixed versions remain installed. ## Rollback considerations - Keep the previous lockfile and deployment artifact. Rolling back reinstates the vulnerable version, so apply any documented mitigation while you fix forward. ## Unresolved questions - Which deployments run an affected version? - Exploitation status can change. Check again before lowering the priority. - Mark the work resolved only after the fixed version is verified in production. ## Sources - Verified: https://github.com/advisories/GHSA-rj75-hqrm-r3gf (GitHub-reviewed advisory GHSA-rj75-hqrm-r3gf lists affected ranges: npm postcss-selector-parser >=0 <7.1.6) - Verified: https://osv.dev/vulnerability/GHSA-rj75-hqrm-r3gf (OSV record GHSA-rj75-hqrm-r3gf lists affected ranges: npm postcss-selector-parser >=0 <7.1.6 (fixed)) - Verified: https://github.com/advisories/GHSA-rj75-hqrm-r3gf (GitHub-reviewed advisory GHSA-rj75-hqrm-r3gf lists affected ranges: npm postcss-selector-parser >=7.0.0 =0 <6.1.5) - Verified: https://osv.dev/vulnerability/GHSA-rj75-hqrm-r3gf (OSV record GHSA-rj75-hqrm-r3gf lists affected ranges: npm postcss-selector-parser >=7.0.0 =0 <6.1.5 (fixed)) Commands are suggestions: review each one before running it.
Loading voting…