CVE-2024-30261: Undici Undici's Fetch With Integrity Option Vulnerability

LOW
Advisory Identifier: GHSA-9qxr-qj54-h672
CVSS 2.6
CWE-284
Published
Advisory Summary

CVE-2024-30261 is a LOW (CVSS 2.6) undici's fetch with integrity option vulnerability (CWE-284: Improper Access Control) affecting Undici libraries in the npm ecosystem. The issue involves undici's fetch with integrity option is too lax when algorithm is specified but hash value is in incorrect. Remediation is available by upgrading affected packages to version 5.28.4, 6.11.1.

CVE-2024-30261 at a Glance

CVE Identifier CVE-2024-30261
GHSA Identifier GHSA-9qxr-qj54-h672
Severity LOW
CVSS v3.1 Base Score 2.6
CWE Classification CWE-284: Improper Access Control
Affected Product Undici
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 2.6

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

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

How to Fix CVE-2024-30261

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

undici fixed: 5.28.4
npm install undici@5.28.4
undici fixed: 6.11.1
npm install undici@6.11.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 undici

How to Check if You Are Affected

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

npm ls undici

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

Note: The npm ls undici 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-284: Improper Access Control, where the product does not restrict or incorrectly restricts access to a resource from an unauthorized actor. In Undici, 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

### Impact If an attacker can alter the `integrity` option passed to `fetch()`, they can let `fetch()` accept requests as valid even if they have been tampered. ### Patches Fixed in https://github.com/nodejs/undici/commit/d542b8cd39ec1ba303f038ea26098c3f355974f3. Fixes has been released in v5.28.4 and v6.11.1. ### Workarounds Ensure that `integrity` cannot be tampered with. ### References https://hackerone.com/reports/2377760

CVE-2024-30261 Affected Undici Versions

2 component(s)
Fixed Versions:
5.28.46.11.1
Product / Package Ecosystem Affected Versions Fixed Version
undici
npm
< 5.28.4
5.28.4
undici
npm
≥ 6.0.0
< 6.11.1
6.11.1

References

Frequently Asked Questions

What is CVE-2024-30261?
CVE-2024-30261 is a security vulnerability in Undici involving Undici's fetch with integrity option is too lax when algorithm is specified but hash value is in incorrect under CWE-284: Improper Access Control.
Which Undici versions are affected?
Affected versions include releases prior to 5.28.4, 6.11.1 across affected packages: undici.
What version fixes CVE-2024-30261?
Upgrading to 5.28.4, 6.11.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is undici affected?
Yes, undici is affected in releases prior to 5.28.4, 6.11.1. Upgrade your dependency to 5.28.4, 6.11.1 or later.
What is the CVSS score of CVE-2024-30261?
CVE-2024-30261 has a CVSS v3.1 base score of 2.6 (LOW) with vector string CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:N/I:L/A:N.
What CWE is associated with CVE-2024-30261?
CVE-2024-30261 is classified under CWE-284: Improper Access Control (The product does not restrict or incorrectly restricts access to a resource from an unauthorized actor.).
How can I check npm dependencies for CVE-2024-30261?
Run the dependency tree command: 'npm ls undici'. 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-9qxr-qj54-h672",
  "modified" : "2025-11-04T19:44:42Z",
  "published" : "2024-04-04T14:20:54Z",
  "aliases" : [ "CVE-2024-30261" ],
  "summary" : "Undici's fetch with integrity option is too lax when algorithm is specified but hash value is in incorrect",
  "details" : "### Impact\n\nIf an attacker can alter the `integrity` option passed to `fetch()`, they can let `fetch()` accept requests as valid even if they have been tampered.\n\n### Patches\n\nFixed in https://github.com/nodejs/undici/commit/d542b8cd39ec1ba303f038ea26098c3f355974f3.\nFixes has been released in v5.28.4 and v6.11.1.\n\n\n### Workarounds\n\nEnsure that `integrity` cannot be tampered with.\n\n### References\n\nhttps://hackerone.com/reports/2377760",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:N/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "undici"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "5.28.4"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "undici"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "6.0.0"
      }, {
        "fixed" : "6.11.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/nodejs/undici/security/advisories/GHSA-9qxr-qj54-h672"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-30261"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/nodejs/undici/commit/2b39440bd9ded841c93dd72138f3b1763ae26055"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/nodejs/undici/commit/d542b8cd39ec1ba303f038ea26098c3f355974f3"
  }, {
    "type" : "WEB",
    "url" : "https://hackerone.com/reports/2377760"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/nodejs/undici"
  }, {
    "type" : "WEB",
    "url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/HQVHWAS6WDXXIU7F72XI55VZ2LTZUB33"
  }, {
    "type" : "WEB",
    "url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/NC3V3HFZ5MOJRZDY5ZELL6REIRSPFROJ"
  }, {
    "type" : "WEB",
    "url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/P6Q4RGETHVYVHDIQGTJGU5AV6NJEI67E"
  }, {
    "type" : "WEB",
    "url" : "https://security.netapp.com/advisory/ntap-20240905-0008"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-284" ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-04-04T14:20:54Z",
    "nvd_published_at" : "2024-04-04T15:15:39Z"
  }
}