CVE-2022-21222
Regular Expression Denial of Service (ReDoS)
The package css-what before 2.1.3 are vulnerable to Regular Expression Denial of Service (ReDoS) due to the usage of insecure regular expression in the re_attr variable of index.js. The exploitation of this vulnerability could be triggered via the parse function.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- None
- Integrity
- None
- Availability
- Low
Exploit likelihood
What each source reports
CVE List Score used
5.3
Regular Expression Denial of Service (ReDoS)
The package css-what before 2.1.3 are vulnerable to Regular Expression Denial of Service (ReDoS) due to the usage of insecure regular expression in the re_attr variable of index.js. The exploitation of this vulnerability could be triggered via the parse function.
- Record
CVE-2022-21222- CVSS 3.1
- 5.3 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L/E:P - Weakness
- CWE-1333
- Updated
- 2026-11-02
EUVDEUVD-2022-7138
5.3
The package css-what before 2.1.3 are vulnerable to Regular Expression Denial of Service (ReDoS) due to the usage of insecure regular expression in the re_attr variable of index.js. The exploitation of this vulnerability could be triggered via the parse function.
- Record
EUVD-2022-7138- CVSS 3.1
- 5.3 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L/E:P - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-p28h-cc7q-c4fg
7.5
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.
- Record
GHSA-p28h-cc7q-c4fg- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Weakness
- CWE-400, CWE-1333
- Updated
- 2026-11-02
NVD
5.3
The package css-what before 2.1.3 are vulnerable to Regular Expression Denial of Service (ReDoS) due to the usage of insecure regular expression in the re_attr variable of index.js. The exploitation of this vulnerability could be triggered via the parse function.
- Record
CVE-2022-21222- CVSS 3.1
- 5.3 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L - CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Weakness
- CWE-1333
- Updated
- 2026-11-02
OSV
5.3
Regular Expression Denial of Service (ReDoS)
The package css-what before 2.1.3 are vulnerable to Regular Expression Denial of Service (ReDoS) due to the usage of insecure regular expression in the re_attr variable of index.js. The exploitation of this vulnerability could be triggered via the parse function.
- Record
CVE-2022-21222- CVSS 3.1
- 5.3 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L/E:P - Updated
- 2026-11-02
OSVDEBIAN-CVE-2022-21222
7.5
The package css-what before 2.1.3 are vulnerable to Regular Expression Denial of Service (ReDoS) due to the usage of insecure regular expression in the re_attr variable of index.js. The exploitation of this vulnerability could be triggered via the parse function.
- Record
DEBIAN-CVE-2022-21222- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Updated
- 2026-11-03
OSVGHSA-p28h-cc7q-c4fg
7.5
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.
- Record
GHSA-p28h-cc7q-c4fg- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Weakness
- CWE-1333, CWE-400
- Updated
- 2026-11-02
OSVUBUNTU-CVE-2022-21222
5.3
The package css-what before 2.1.3 are vulnerable to Regular Expression Denial of Service (ReDoS) due to the usage of insecure regular expression in the re_attr variable of index.js. The exploitation of this vulnerability could be triggered via the parse function.
- Record
UBUNTU-CVE-2022-21222- CVSS 3.1
- 5.3 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L - CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Updated
- 2026-11-02
OSVUSN-6065-1 No score
node-css-what vulnerabilities
It was discovered that css-what incorrectly handled certain inputs. If a user or an automated system were tricked into opening a specially crafted input file, a remote attacker could possibly use this issue to cause a denial of service. (CVE-2021-33587, CVE-2022-21222)
- Record
USN-6065-1- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
css-whatnpm |
before 2.1.3 | 2.1.3 |
node-css-whatDebian:12 |
before 5.0.1-1 | 5.0.1-1 |
node-css-whatDebian:13 |
before 5.0.1-1 | 5.0.1-1 |
node-css-whatDebian:14 |
before 5.0.1-1 | 5.0.1-1 |
node-css-whatDebian:10 From an advisory covering 2 CVEs |
before 2.1.0-1+deb10u1, plus listed versions 2.1.0-1 |
2.1.0-1+deb10u1 |
node-css-whatUbuntu:Pro:16.04:LTS |
before 2.1.0-1ubuntu0.16.04.1~esm1, plus listed versions 2.0.2-12.1.0-1 |
2.1.0-1ubuntu0.16.04.1~esm1 |
node-css-whatUbuntu:18.04:LTS |
before 2.1.0-1+deb10u1build0.18.04.1, plus listed versions 2.1.0-1 |
2.1.0-1+deb10u1build0.18.04.1 |
node-css-whatUbuntu:Pro:20.04:LTS |
before 3.2.1-1ubuntu0.1~esm1, plus listed versions 3.1.0-23.2.0-13.2.1-1 |
3.2.1-1ubuntu0.1~esm1 |
node-css-whatUbuntu:24.04:LTS |
All versions, plus listed versions 6.1.0-5 |
None known |
node-css-whatUbuntu:25.10 |
All versions, plus listed versions 6.1.0-5 |
None known |
Show 5 moreShow less
| Package | Affected | Fixed |
|---|---|---|
node-css-whatUbuntu:26.10 |
All versions, plus listed versions 6.1.0-56.2.2-26.2.2-3 |
None known |
node-css-whatUbuntu:26.04:LTS |
All versions, plus listed versions 6.1.0-5 |
None known |
node-css-whatUbuntu:Pro:16.04:LTS From an advisory covering 2 CVEs |
before 2.1.0-1ubuntu0.16.04.1~esm1, plus listed versions 2.0.2-12.1.0-1 |
2.1.0-1ubuntu0.16.04.1~esm1 |
node-css-whatUbuntu:18.04:LTS From an advisory covering 2 CVEs |
before 2.1.0-1+deb10u1build0.18.04.1, plus listed versions 2.1.0-1 |
2.1.0-1+deb10u1build0.18.04.1 |
node-css-whatUbuntu:Pro:20.04:LTS From an advisory covering 2 CVEs |
before 3.2.1-1ubuntu0.1~esm1, plus listed versions 3.1.0-23.2.0-13.2.1-1 |
3.2.1-1ubuntu0.1~esm1 |
History
| Recorded | Changed | Sources |
|---|---|---|
| affected, facts | OSV | |
| first indexed | CVE List, EUVD, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2022-21222 is a medium vulnerability (CVSS 5.3) in Css-what Project Css-what, published September 30, 2022. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 1.90%, the 79th percentile. Fixed in css-what 2.1.3.
References
security.snyk.io/vuln/SNYK-JS-CSSWHAT-3035488
github.com/fb55/css-what/blob/a38effd5a8f5506d75c7f8f13cbd8c76248a3860/index.js%23L12
lists.debian.org/debian-lts-announce/2023/03/msg00001.html
nvd.nist.gov/vuln/detail/CVE-2022-21222
github.com/fb55/css-what/commit/dc510929790da6617e7aa93a616498b22f6a6b72
github.com/fb55/css-what/blob/a38effd5a8f5506d75c7f8f13cbd8c76248a3860/index.js
Show 8 moreShow less
github.com/advisories/GHSA-p28h-cc7q-c4fg
github.com/CVEProject/cvelistV5/tree/main/cves/2022/21xxx/CVE-2022-21222.json
security-tracker.debian.org/tracker/CVE-2022-21222
github.com/fb55/css-what
ubuntu.com/security/CVE-2022-21222
ubuntu.com/security/notices/USN-6065-1
cve.org/CVERecord?id=CVE-2022-21222
ubuntu.com/security/CVE-2021-33587