Inefficient Regular Expression Complexity Affecting node-css-what package, versions <2.1.0-1ubuntu0.16.04.1~esm1


Severity

Recommended
medium

Based on Ubuntu security rating.

Threat Intelligence

EPSS
1.9% (79th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-UBUNTU1604-NODECSSWHAT-3037601
  • published1 Jun 2025
  • disclosed30 Sept 2022

Introduced: 30 Sep 2022

CVE-2022-21222  (opens in a new tab)
CWE-1333  (opens in a new tab)

How to fix?

Upgrade Ubuntu:16.04 node-css-what to version 2.1.0-1ubuntu0.16.04.1~esm1 or higher.

NVD Description

Note: Versions mentioned in the description apply only to the upstream node-css-what package and not the node-css-what package as distributed by Ubuntu. See How to fix? for Ubuntu:16.04 relevant fixed versions and status.

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.

CVSS Base Scores

version 3.1