Every CVE Search/ Get API key

CVE-2026-104844

PostCSS: Quadratic complexity in flat selector parsing allows CPU exhaustion

5.9 MediumFix available

PostCSS Selector Parser is a CSS selector parser that integrates with PostCSS but does not require it. Prior to 7.1.6, src/parser.js splitWord() can receive a flat selector as one word token carrying many class or ID indexes because period and hash characters are not tokenizer word delimiters. The uniqs() deduplication and per-index class and ID membership checks repeatedly scan the class and ID index arrays, while a separate Sass-interpolation filtering pass also performs repeated linear scanning. Together, these passes make parsing quadratic in the number of indexes and allow a crafted selector to occupy a synchronous parser thread. The maxNestingDepth guard does not mitigate the issue because the hostile selector can have zero nesting depth. Only consumers that synchronously parse untrusted selectors in an exposed request path are affected; ordinary build-time parsing of trusted sources is not affected. This issue is fixed in version 7.1.6.

Attack profile

How easy it is to exploit

Attack vector
Network
Complexity
High
Privileges needed
None
User interaction
None

What an attacker can affect

Confidentiality
None
Integrity
None
Availability
High

Exploit likelihood

0.39%Unchanged since Oct 3, 2026
90%50%10%1%

What each source reports

CVE List Score used 5.9

PostCSS: Quadratic complexity in flat selector parsing allows CPU exhaustion

PostCSS Selector Parser is a CSS selector parser that integrates with PostCSS but does not require it. Prior to 7.1.6, src/parser.js splitWord() can receive a flat selector as one word token carrying many class or ID indexes because period and hash characters are not tokenizer word delimiters. The uniqs() deduplication and per-index class and ID membership checks repeatedly scan the class and ID index arrays, while a separate Sass-interpolation filtering pass also performs repeated linear scanning. Together, these passes make parsing quadratic in the number of indexes and allow a crafted selector to occupy a synchronous parser thread. The maxNestingDepth guard does not mitigate the issue because the hostile selector can have zero nesting depth. Only consumers that synchronously parse untrusted selectors in an exposed request path are affected; ordinary build-time parsing of trusted sources is not affected. This issue is fixed in version 7.1.6.

Record
CVE-2026-104844
CVSS 3.1
5.9 MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
Weakness
CWE-400, CWE-407
Updated
2026-11-02
EUVDEUVD-2026-91741 5.9

PostCSS Selector Parser is a CSS selector parser that integrates with PostCSS but does not require it. Prior to 7.1.6, src/parser.js splitWord() can receive a flat selector as one word token carrying many class or ID indexes because period and hash characters are not tokenizer word delimiters. The uniqs() deduplication and per-index class and ID membership checks repeatedly scan the class and ID index arrays, while a separate Sass-interpolation filtering pass also performs repeated linear scanning. Together, these passes make parsing quadratic in the number of indexes and allow a crafted selector to occupy a synchronous parser thread. The maxNestingDepth guard does not mitigate the issue because the hostile selector can have zero nesting depth. Only consumers that synchronously parse untrusted selectors in an exposed request path are affected; ordinary build-time parsing of trusted sources is not affected. This issue is fixed in version 7.1.6.

Record
EUVD-2026-91741
CVSS 3.1
5.9 MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
Updated
2026-11-02
GitHub AdvisoriesGHSA-rj75-hqrm-r3gf 5.9

PostCSS: Quadratic complexity in flat selector parsing allows CPU exhaustion

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.

Record
GHSA-rj75-hqrm-r3gf
CVSS 3.1
5.9 MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
Weakness
CWE-400, CWE-407
Updated
2026-11-02
NVD 5.9

PostCSS Selector Parser is a CSS selector parser that integrates with PostCSS but does not require it. Prior to 7.1.6, src/parser.js splitWord() can receive a flat selector as one word token carrying many class or ID indexes because period and hash characters are not tokenizer word delimiters. The uniqs() deduplication and per-index class and ID membership checks repeatedly scan the class and ID index arrays, while a separate Sass-interpolation filtering pass also performs repeated linear scanning. Together, these passes make parsing quadratic in the number of indexes and allow a crafted selector to occupy a synchronous parser thread. The maxNestingDepth guard does not mitigate the issue because the hostile selector can have zero nesting depth. Only consumers that synchronously parse untrusted selectors in an exposed request path are affected; ordinary build-time parsing of trusted sources is not affected. This issue is fixed in version 7.1.6.

Record
CVE-2026-104844
CVSS 3.1
5.9 MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
Weakness
CWE-400, CWE-407
Updated
2026-11-02
OSV 5.9

PostCSS: Quadratic complexity in flat selector parsing allows CPU exhaustion

PostCSS Selector Parser is a CSS selector parser that integrates with PostCSS but does not require it. Prior to 7.1.6, src/parser.js splitWord() can receive a flat selector as one word token carrying many class or ID indexes because period and hash characters are not tokenizer word delimiters. The uniqs() deduplication and per-index class and ID membership checks repeatedly scan the class and ID index arrays, while a separate Sass-interpolation filtering pass also performs repeated linear scanning. Together, these passes make parsing quadratic in the number of indexes and allow a crafted selector to occupy a synchronous parser thread. The maxNestingDepth guard does not mitigate the issue because the hostile selector can have zero nesting depth. Only consumers that synchronously parse untrusted selectors in an exposed request path are affected; ordinary build-time parsing of trusted sources is not affected. This issue is fixed in version 7.1.6.

Record
CVE-2026-104844
CVSS 3.1
5.9 MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
Weakness
CWE-400, CWE-407
Updated
2026-11-02
OSVGHSA-rj75-hqrm-r3gf 5.9

PostCSS: Quadratic complexity in flat selector parsing allows CPU exhaustion

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.

Record
GHSA-rj75-hqrm-r3gf
CVSS 3.1
5.9 MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
Weakness
CWE-400, CWE-407
Updated
2026-11-02
Show 9 moreShow less
OSVCLSA-2026-1791278836 No score

TuxCare security update for postcss-selector-parser (1 CVE)

TuxCare rebuilt postcss-selector-parser to address 1 CVE. Fixed in 3.1.2-tuxcare.1.

Record
CLSA-2026-1791278836
Updated
2026-11-02
OSVCLSA-2026-1792450509 No score

TuxCare security update for postcss-selector-parser (2 CVEs)

TuxCare rebuilt postcss-selector-parser to address 2 CVEs. Fixed in 7.1.0-tuxcare.1.

Record
CLSA-2026-1792450509
Updated
2026-11-02
OSVCLSA-2026-1792473324 No score

TuxCare security update for postcss-selector-parser (1 CVE)

TuxCare rebuilt postcss-selector-parser to address 1 CVE. Fixed in 2.2.3-tuxcare.1.

Record
CLSA-2026-1792473324
Updated
2026-11-02
OSVCLSA-2026-1792476079 No score

TuxCare security update for postcss-selector-parser (2 CVEs)

TuxCare rebuilt postcss-selector-parser to address 2 CVEs. Fixed in 6.1.2-tuxcare.1.

Record
CLSA-2026-1792476079
Updated
2026-11-02
OSVCLSA-2026-1792489723 No score

TuxCare security update for postcss-selector-parser (1 CVE)

TuxCare rebuilt postcss-selector-parser to address 1 CVE. Fixed in 5.0.0-tuxcare.1.

Record
CLSA-2026-1792489723
Updated
2026-11-02
OSVCLSA-2026-1792489741 No score

TuxCare security update for postcss-selector-parser (1 CVE)

TuxCare rebuilt postcss-selector-parser to address 1 CVE. Fixed in 6.1.4-tuxcare.1.

Record
CLSA-2026-1792489741
Updated
2026-11-02
OSVCLSA-2026-1792489830 No score

TuxCare security update for postcss-selector-parser (1 CVE)

TuxCare rebuilt postcss-selector-parser to address 1 CVE. Fixed in 7.1.4-tuxcare.1.

Record
CLSA-2026-1792489830
Updated
2026-11-02
OSVCLSA-2026-1792489937 No score

TuxCare security update for postcss-selector-parser (2 CVEs)

TuxCare rebuilt postcss-selector-parser to address 2 CVEs. Fixed in 7.1.1-tuxcare.1.

Record
CLSA-2026-1792489937
Updated
2026-11-02
OSVopenSUSE-SU-2026:12083-1 No score

git-bug-0.11.0-2.1 on GA media

These are all security issues fixed in the git-bug-0.11.0-2.1 package on the GA media of openSUSE Tumbleweed.

Record
openSUSE-SU-2026:12083-1
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
postcss-selector-parser
npm
7.0.0 up to 7.1.6
7.1.6
postcss-selector-parser
npm
before 6.1.5
6.1.5
postcss-selector-parser
TuxCare:npm
3.1.2-tuxcare.0 up to 3.1.2-tuxcare.1, plus listed versions
3.1.2
3.1.2-tuxcare.1
postcss-selector-parser
TuxCare:npm
From an advisory covering 2 CVEs
7.1.0-tuxcare.0 up to 7.1.0-tuxcare.1, plus listed versions
7.1.0
7.1.0-tuxcare.1
postcss-selector-parser
TuxCare:npm
2.2.3-tuxcare.0 up to 2.2.3-tuxcare.1, plus listed versions
2.2.3
2.2.3-tuxcare.1
postcss-selector-parser
TuxCare:npm
From an advisory covering 2 CVEs
6.1.2-tuxcare.0 up to 6.1.2-tuxcare.1, plus listed versions
6.1.2
6.1.2-tuxcare.1
postcss-selector-parser
TuxCare:npm
5.0.0-tuxcare.0 up to 5.0.0-tuxcare.1, plus listed versions
5.0.0
5.0.0-tuxcare.1
postcss-selector-parser
TuxCare:npm
6.1.4-tuxcare.0 up to 6.1.4-tuxcare.1, plus listed versions
6.1.4
6.1.4-tuxcare.1
postcss-selector-parser
TuxCare:npm
7.1.4-tuxcare.0 up to 7.1.4-tuxcare.1, plus listed versions
7.1.4
7.1.4-tuxcare.1
postcss-selector-parser
TuxCare:npm
From an advisory covering 2 CVEs
7.1.1-tuxcare.0 up to 7.1.1-tuxcare.1, plus listed versions
7.1.1
7.1.1-tuxcare.1
git-bug
openSUSE:Tumbleweed
before 0.11.0-2.1
0.11.0-2.1

History

History
RecordedChangedSources
affected, facts
first indexedCVE List, EUVD, GitHub Advisories, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2026-104844 is a medium vulnerability (CVSS 5.9) in Postcss Postcss-selector-parser, published October 2, 2026. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.39%, the 33rd percentile. Fixed in postcss-selector-parser 7.1.6.

References

Show 5 moreShow less
MoveEnter Open