css-what vulnerable to ReDoS due to use of insecure regular expression
The package css-what before 2.1.3 is vulnerable to Regular Expression Denial of Service (ReDoS) due to the use of insecure regular expression in the re_attr variable of index.js. The exploitation of this vulnerability could be triggered via the parse function.
Affected software
Click a technology to see all vulnerabilities affecting it.
| Platform | Package | Vulnerable versions | Fixed in |
|---|---|---|---|
| npm package | css-what | < 2.1.3 | 2.1.3 |
References
- https://nvd.nist.gov/vuln/detail/CVE-2022-21222
- https://github.com/fb55/css-what/commit/dc510929790da6617e7aa93a616498b22f6a6b72
- https://github.com/fb55/css-what
- https://github.com/fb55/css-what/blob/a38effd5a8f5506d75c7f8f13cbd8c76248a3860/index.js#23L12
- https://github.com/fb55/css-what/blob/a38effd5a8f5506d75c7f8f13cbd8c76248a3860/index.js%23L12
- https://lists.debian.org/debian-lts-announce/2023/03/msg00001.html
- https://security.snyk.io/vuln/SNYK-JS-CSSWHAT-3035488
- CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H- Weakness (CWE)
CWE-1333, CWE-400- Platform
- npm
- Package
css-what- Disclosed
- 01.10.2022
- Updated
- 11.10.2026 10:22
Sources and licenses
OSV / GitHub Advisory Database - GHSA-p28h-cc7q-c4fg - CC BY 4.0
Vulnerability history: css-what
All published vulnerabilities of this package (npm package), newest first. Shows whether this is a one-off slip or a package that needs watching.
- Total entries
- 2
- First → latest
- 06.2021 10.2022
- Without a fix
- 0
- Exploited in attacks
- 0
Severity breakdown
- High 2
Disclosures per year
- 2021: 1
- 2022: 1
- 2023: 0
- 2024: 0
- 2025: 0
- 2026: 0
-
css-what vulnerable to ReDoS due to use of insecure regular expression this entry
Know which vulnerabilities affect your application
With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.