Categories
CVE-2026-104844 medium CVSS 5.9

Vulnerability in postcss-selector-parser (CVE-2026-104844)

Summary

Vulnerability in postcss-selector-parser (CVE-2026-104844). Risk of unauthorized operations or information disclosure. Exploitable via indices.forEach. Mitigation: upgrade to 7.1.6 or later.

Original description

The description as published by the source.

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 sources is not affected.

Patches

Fixed in 7.1.6. The three passes now use Set membership tests, making parsing
linear in the number of indexes. There is no behaviour change: parsing is
byte-identical on a differential corpus of 8413 selectors.

Workarounds

Cap the size of selectors accepted from untrusted sources before parsing.

Source: NIST National Vulnerability Database NVD GitHub Advisory

Auto-generated summary

Assembled by SecPulse from the source data (CVSS, CWE, affected versions) using templates — no AI involved. Check the original description and references below for exact details.

A vulnerability tracked as CVE-2026-104844 has been found in postcss-selector-parser.
Attackers can target a specific entry point like indices.forEach over the network to misuse the product.
Risk of unauthorized operations or information disclosure. CVSS score: 5.9/10.
What to do: upgrade postcss-selector-parser to 7.1.6 or later.
If unsure, ask your IT team or search "postcss-selector-parser CVE-2026-104844" on the vendor's site.

CVE-2026-104844 (postcss-selector-parser) — CWE-400 / CVSS v3 5.9
Attack vector: remote (network-reachable) / unauthenticated / no user interaction
Attack surface: indices.forEach / maxNestingDepth
Patched: 7.1.6 — apply immediately
Workaround: Cap the size of selectors accepted from untrusted sources before parsing.
Plan: 1) Audit SBOM/dependencies, 2) Stage→prod upgrade, 3) Add WAF/proxy monitoring on affected endpoints, 4) Hunt IOCs in logs.
Refs: see the GHSA / vendor advisory / patched release linked on this page.

❓ What is the problem

A vulnerability (CWE-400) exists in postcss-selector-parser. Attackers reach the vulnerable code path via indices.forEach without authentication.

📍 Affected scope

Check the vendor advisory for the affected versions of postcss-selector-parser. Attack surface: indices.forEach / maxNestingDepth.

🔥 Severity

Severity: Medium (CVSS 5.9/10). Risk of unauthorized operations or information disclosure.

🔧 How to fix

Update to 7.1.6.

🛡️ Workaround

Workaround: Cap the size of selectors accepted from untrusted sources before parsing.

🔍 Detection

Search webserver/proxy logs for unusual request patterns matching this CVE's known IOCs. Run grep -r 'postcss-selector-parser' . against your dependency files (package-lock.json, requirements.txt, go.sum) to find affected services.

Response actions

Concrete steps and command examples for SOC/SRE teams to execute in order

  1. 1
    Identify exposure identify
    grep -r 'postcss-selector-parser' . | grep -v node_modules

    リポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で postcss-selector-parser を grep し、稼働しているサービス・バージョンを把握する。

  2. 2
    Apply temporary workaround mitigate
    Cap the size of selectors accepted from untrusted sources before parsing.

    パッチが適用されるまでの応急処置として、Cap the size of selectors accepted from untrusted sources before parsing. を実施。回避策の副作用 (機能低下) を確認した上で。

  3. 3
    Apply patch patch
    Upgrade postcss-selector-parser to 7.1.6

    ステージング環境で 7.1.6 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。

  4. 4
    Post-deployment verification verify
    Confirm patched version is live in production

    パッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。

Affected packages

npm postcss-selector-parser
[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"7.1.6"}]}]

References

We use cookies for analytics and ad measurement. This setting applies to all Game co., Ltd. sites. Details