CVE-2022-37599: Loader utils Denial of Service Vulnerability

HIGH
Advisory Identifier: GHSA-hhq3-ff78-jv3g
CVSS 7.5
CWE-400 CWE-1333
Published
Advisory Summary

CVE-2022-37599 is a HIGH (CVSS 7.5) denial of service vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting Loader utils libraries in the npm ecosystem. The issue involves loader-utils is vulnerable to regular expression denial of service (redos). Remediation is available by upgrading affected packages to version 1.4.2, 2.0.4, 3.2.1.

CVE-2022-37599 at a Glance

CVE Identifier CVE-2022-37599
GHSA Identifier GHSA-hhq3-ff78-jv3g
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-400: Uncontrolled Resource Consumption
Affected Product Loader utils
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 7.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity None (I:N)
Availability High (A:H)

How to Fix CVE-2022-37599

To remediate this vulnerability, upgrade all affected Loader utils dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

loader-utils fixed: 1.4.2
npm install loader-utils@1.4.2
loader-utils fixed: 2.0.4
npm install loader-utils@2.0.4
loader-utils fixed: 3.2.1
npm install loader-utils@3.2.1
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls loader-utils

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2022-37599, inspect your project dependencies using npm:

npm ls loader-utils

Analyze the terminal output to locate any version of Loader utils in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.4.2), your application is affected.

Note: The npm ls loader-utils command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-400: Uncontrolled Resource Consumption, where the product does not properly control the allocation and maintenance of a limited resource. In Loader utils, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

A regular expression denial of service (ReDoS) flaw was found in Function interpolateName in interpolateName.js in webpack loader-utils via the resourcePath variable in interpolateName.js. A badly or maliciously formed string could be used to send crafted requests that cause a system to crash or take a disproportional amount of time to process. This issue has been patched in versions 1.4.2, 2.0.4 and 3.2.1.

CVE-2022-37599 Affected Loader utils Versions

3 component(s)
Fixed Versions:
1.4.22.0.43.2.1
Product / Package Ecosystem Affected Versions Fixed Version
loader-utils
npm
≥ 1.0.0
< 1.4.2
1.4.2
loader-utils
npm
≥ 2.0.0
< 2.0.4
2.0.4
loader-utils
npm
≥ 3.0.0
< 3.2.1
3.2.1

References

NVD — CVE-2022-37599 NVD
https://nvd.nist.gov/vuln/detail/CVE-2022-37599
Loader utils Source Repository REPOSITORY
https://github.com/webpack/loader-utils/issues/211
Loader utils Source Repository REPOSITORY
https://github.com/webpack/loader-utils/issues/216
Security Fix Commit FIX COMMIT
https://github.com/webpack/loader-utils/commit/17cbf8fa8989c1cb45bdd2997aa524729475f1fa
Security Fix Commit FIX COMMIT
https://github.com/webpack/loader-utils/commit/ac09944dfacd7c4497ef692894b09e63e09a5eeb
Security Fix Commit FIX COMMIT
https://github.com/webpack/loader-utils/commit/d2d752d59629daee38f34b24307221349c490eb1
Loader utils Source Repository REPOSITORY
https://github.com/webpack/loader-utils
Loader utils Source Repository REPOSITORY
https://github.com/webpack/loader-utils/blob/d9f4e23cf411d8556f8bac2d3bf05a6e0103b568/lib/interpolateName.js#L38
Loader utils Source Repository REPOSITORY
https://github.com/webpack/loader-utils/blob/d9f4e23cf411d8556f8bac2d3bf05a6e0103b568/lib/interpolateName.js#L83
lists.fedoraproject.org/archives/list/packa... WEB
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/3HUE6ZR5SL73KHL7XUPAOEL6SB7HUDT2
lists.fedoraproject.org/archives/list/packa... WEB
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/6PVVPNSAGSDS63HQ74PJ7MZ3MU5IYNVZ
lists.fedoraproject.org/archives/list/packa... WEB
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/6PVVPNSAGSDS63HQ74PJ7MZ3MU5IYNVZ

Frequently Asked Questions

What is CVE-2022-37599?
CVE-2022-37599 is a security vulnerability in Loader utils involving loader-utils is vulnerable to Regular Expression Denial of Service (ReDoS) under CWE-400: Uncontrolled Resource Consumption.
Which Loader utils versions are affected?
Affected versions include releases prior to 1.4.2, 2.0.4, 3.2.1 across affected packages: loader-utils.
What version fixes CVE-2022-37599?
Upgrading to 1.4.2, 2.0.4, 3.2.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is loader-utils affected?
Yes, loader-utils is affected in releases prior to 1.4.2, 2.0.4, 3.2.1. Upgrade your dependency to 1.4.2, 2.0.4, 3.2.1 or later.
What is the CVSS score of CVE-2022-37599?
CVE-2022-37599 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H.
What CWE is associated with CVE-2022-37599?
CVE-2022-37599 is classified under CWE-400: Uncontrolled Resource Consumption (The product does not properly control the allocation and maintenance of a limited resource.).
How can I check npm dependencies for CVE-2022-37599?
Run the dependency tree command: 'npm ls loader-utils'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-hhq3-ff78-jv3g",
  "modified" : "2025-11-04T22:07:19Z",
  "published" : "2022-10-12T12:00:27Z",
  "aliases" : [ "CVE-2022-37599" ],
  "summary" : "loader-utils is vulnerable to Regular Expression Denial of Service (ReDoS)",
  "details" : "A regular expression denial of service (ReDoS) flaw was found in Function interpolateName in interpolateName.js in webpack loader-utils via the resourcePath variable in interpolateName.js. A badly or maliciously formed string could be used to send crafted requests that cause a system to crash or take a disproportional amount of time to process. This issue has been patched in versions 1.4.2, 2.0.4 and 3.2.1.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "loader-utils"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.0.0"
      }, {
        "fixed" : "1.4.2"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "loader-utils"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.0.0"
      }, {
        "fixed" : "2.0.4"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "loader-utils"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.0.0"
      }, {
        "fixed" : "3.2.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-37599"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/webpack/loader-utils/issues/211"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/webpack/loader-utils/issues/216"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/webpack/loader-utils/commit/17cbf8fa8989c1cb45bdd2997aa524729475f1fa"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/webpack/loader-utils/commit/ac09944dfacd7c4497ef692894b09e63e09a5eeb"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/webpack/loader-utils/commit/d2d752d59629daee38f34b24307221349c490eb1"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/webpack/loader-utils"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/webpack/loader-utils/blob/d9f4e23cf411d8556f8bac2d3bf05a6e0103b568/lib/interpolateName.js#L38"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/webpack/loader-utils/blob/d9f4e23cf411d8556f8bac2d3bf05a6e0103b568/lib/interpolateName.js#L83"
  }, {
    "type" : "WEB",
    "url" : "https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/3HUE6ZR5SL73KHL7XUPAOEL6SB7HUDT2"
  }, {
    "type" : "WEB",
    "url" : "https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/6PVVPNSAGSDS63HQ74PJ7MZ3MU5IYNVZ"
  }, {
    "type" : "WEB",
    "url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/6PVVPNSAGSDS63HQ74PJ7MZ3MU5IYNVZ"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-1333", "CWE-400" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-11-15T21:03:46Z",
    "nvd_published_at" : "2022-10-11T19:15:00Z"
  }
}