CVE-2021-23368: Regular Expression Denial of Service in postcss
5.3
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.52916%
CWE
Published
5/10/2021
Updated
2/1/2023
KEV Status
No
Technology
JavaScript
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
postcss | npm | >= 7.0.0, < 7.0.36 | 7.0.36 |
postcss | npm | >= 8.0.0, < 8.2.10 | 8.2.10 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from insecure regex patterns in source map parsing functions. Commit diffs show fixes to these regexes (removing \s* and adding negative lookaheads). The Snyk PoC demonstrates ReDoS via sourceMappingURL parsing, directly implicating these functions. Both functions handled source map annotation extraction with patterns vulnerable to catastrophic backtracking.