Skip to main content

CVE-2026-104844: CWE-400: Uncontrolled Resource Consumption in postcss postcss-selector-parser

0
Medium
VulnerabilityCVE-2026-104844cvecve-2026-104844cwe-400cwe-407
Published: 10/02/2026 (10/02/2026, 15:43:14 UTC)
Source: CVE Database V5
Vendor/Project: postcss
Product: postcss-selector-parser

Description

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.

CVSS v3.1

Score 5.9medium

Attack Vector
Network
Attack Complexity
High
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H

Affected software

postcss

postcss-selector-parser

Affected versions
<7.1.6
postcss-selector-parser
pkg:npm/postcss-selector-parser
Affected versions
<7.1.6

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 10/02/2026, 16:16:22 UTC

Technical Analysis

The vulnerability in postcss-selector-parser arises because the splitWord() function treats flat selectors containing many class or ID indexes as a single word token, since period and hash characters are not treated as word delimiters. This causes multiple passes—uniqs() deduplication, class and ID membership checks, and Sass-interpolation filtering—to repeatedly scan large arrays, resulting in quadratic time complexity relative to the number of indexes. An attacker can craft selectors that exploit this inefficiency to consume excessive CPU resources synchronously, leading to denial of service. The maxNestingDepth guard does not prevent this because the malicious selector can have zero nesting depth. Only consumers that synchronously parse untrusted selectors in exposed request paths are vulnerable. The issue is resolved in version 7.1.6.

Potential Impact

An attacker can cause a denial of service by submitting specially crafted CSS selectors that trigger excessive CPU consumption during synchronous parsing. This impacts availability but does not affect confidentiality or integrity. The vulnerability only affects environments that parse untrusted selectors synchronously in exposed request paths, not typical build-time parsing of trusted sources.

Mitigation Recommendations

Upgrade postcss-selector-parser to version 7.1.6 or later where this issue is fixed. If upgrading is not immediately possible, avoid synchronously parsing untrusted selectors in exposed request paths to mitigate the risk.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
GitHub_M
Date Reserved
2026-10-02T14:38:43.243Z
Cvss Version
3.1
State
PUBLISHED

Threat ID: 6abfd567a43b0b3b89d3b445

Added to database: 10/02/2026, 16:01:43 UTC

Last enriched: 10/02/2026, 16:16:22 UTC

Last updated: 10/03/2026, 03:09:17 UTC

Views: 11

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses