CVE-2022-21222: Regular Expression Denial of Service (ReDoS)

Published Sep 30, 2022
·
Updated

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 reattr variable of index.js. The exploitation of this vulnerability could be triggered via the parse function.

Other sources

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 reattr variable of index.js. The exploitation of this vulnerability could be triggered via the parse function.

Affected Software

10 affected componentsFixes available
Css-what Project Css-what Node.js<2.1.3
npm/css-what<2.1.3
2.1.3
debian/node-css-what<5.0.1-1
5.0.1-1
debian/node-css-what<5.0.1-1
5.0.1-1
debian/node-css-what<5.0.1-1
5.0.1-1
debian/node-css-what
2.1.0-1+deb10u14.0.0-3+deb11u15.0.1-1
ubuntu/node-css-what<2.1.0-1ubuntu0.16.04.1~esm1
2.1.0-1ubuntu0.16.04.1~esm1
ubuntu/node-css-what<2.1.0-1+deb10u1build0.18.04.1
2.1.0-1+deb10u1build0.18.04.1
ubuntu/node-css-what<3.2.1-1ubuntu0.1~esm1
3.2.1-1ubuntu0.1~esm1
ubuntu/node-css-what*

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade npm/css-what to a version that resolves this vulnerability.

    Fixed in 2.1.3
  2. Upgrade

    Upgrade debian/node-css-what to a version that resolves this vulnerability.

    Fixed in 5.0.1-1
  3. Upgrade

    Upgrade debian/node-css-what to a version that resolves this vulnerability.

    Fixed in 2.1.0-1+deb10u1Fixed in 4.0.0-3+deb11u1Fixed in 5.0.1-1
  4. Upgrade

    Upgrade ubuntu/node-css-what to a version that resolves this vulnerability.

    Fixed in 2.1.0-1ubuntu0.16.04.1~esm1
  5. Upgrade

    Upgrade ubuntu/node-css-what to a version that resolves this vulnerability.

    Fixed in 2.1.0-1+deb10u1build0.18.04.1
  6. Upgrade

    Upgrade ubuntu/node-css-what to a version that resolves this vulnerability.

    Fixed in 3.2.1-1ubuntu0.1~esm1

Event History

Sep 30, 2022
CVE Published
via MITRE·12:00 AM
Data Sourced
via MITRE·12:00 AM
DescriptionSeverityWeakness
CVE Published
via MITRE·05:05 AM
Data Sourced
via OSV·05:15 AM
DescriptionSeverityAffected Software
Data Sourced
05:15 AM
DescriptionSeverityWeaknessAffected Software
Oct 1, 2022
Advisory Published
12:00 AM
Nov 29, 2023
Advisory Published
12:06 AM
May 20, 2025
Data Sourced
via NVD·04:15 PM
DescriptionSeverityWeaknessAffected Software
Updated
via NVD·04:15 PM
WeaknessAffected Software
Data Sourced
via GitHub·09:02 PM
DescriptionSeverityWeaknessAffected Software
Updated
via GitHub·09:02 PM
Weakness

Peer vulnerabilities

Found alongside the following vulnerabilities.

Frequently Asked Questions

1

What is CVE-2022-21222?

CVE-2022-21222 is a vulnerability in the package css-what before version 2.1.3 that allows for Regular Expression Denial of Service (ReDoS) attacks.

2

How does CVE-2022-21222 affect css-what package?

CVE-2022-21222 affects the css-what package before version 2.1.3 by exploiting an insecure regular expression in the re_attr variable of index.js, allowing for ReDoS attacks via the parse function.

3

What is the severity of CVE-2022-21222?

CVE-2022-21222 has a severity rating of high (7.5) based on the NVD severity scoring.

4

How can I fix CVE-2022-21222?

To fix CVE-2022-21222, upgrade the css-what package to version 2.1.3 or later, which includes the necessary fix.

5

Where can I find more information about CVE-2022-21222?

You can find more information about CVE-2022-21222 on the following references: [NVD](https://nvd.nist.gov/vuln/detail/CVE-2022-21222), [Snyk](https://security.snyk.io/vuln/SNYK-JS-CSSWHAT-3035488), [GitHub](https://github.com/fb55/css-what/commit/dc510929790da6617e7aa93a616498b22f6a6b72)

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203