What’s Vulnerable › Vulnerabilities
CVE-2021-23382: Regular Expression Denial of Service (ReDoS)
- Severity: high (CVSS 7.5 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 2.6% probability of exploitation in the next 30 days
- Public exploit or detection template: yes
- Published: 2021-04-26 · updated 2026-06-17
- Weakness: CWE-1333
Description
The package postcss before 8.2.13 are vulnerable to Regular Expression Denial of Service (ReDoS) via getAnnotationURL() and loadAnnotation() in lib/previous-map.js. The vulnerable regexes are caused mainly by the sub-pattern \/\*\s* sourceMappingURL=(.*).
Affected products
- postcss: before 7.0.36; from 8.0.0 before 8.2.13 — fixed in 7.0.36, 8.2.13
- Npm Postcss: from 8.0.0 before 8.2.13; before 7.0.36 — fixed in 8.2.13, 7.0.36
How to fix
Upgrade to a fixed version: postcss 7.0.36, 8.2.13; Npm Postcss 8.2.13, 7.0.36. Check the vendor advisory for mitigations.
References
- https://github.com/postcss/postcss/commit/2b1d04c867995e55124e0a165b7c6622c1735956
- https://snyk.io/vuln/SNYK-JAVA-ORGWEBJARSNPM-1255641
- https://snyk.io/vuln/SNYK-JS-POSTCSS-1255640
- https://github.com/postcss/postcss/commit/2b1d04c867995e55124e0a165b7c6622c1735956
- https://snyk.io/vuln/SNYK-JAVA-ORGWEBJARSNPM-1255641
- https://snyk.io/vuln/SNYK-JS-POSTCSS-1255640
Get alerted when CVE-2021-23382 or the next vulnerability affects your stack