CVE-2025-24033: @fastify/multipart Remote Code Execution Vulnerability

HIGH
Advisory Identifier: GHSA-27c6-mcxv-x3fh
CVSS 7.5
CWE-770
Published
Advisory Summary

CVE-2025-24033 is a HIGH (CVSS 7.5) remote code execution vulnerability (CWE-770: Allocation of Resources Without Limits or Throttling) affecting @fastify/multipart libraries in the npm ecosystem. The issue involves unlimited consumption of resources in @fastify/multipart. Remediation is available by upgrading affected packages to version 8.3.1, 9.0.3.

CVE-2025-24033 at a Glance

CVE Identifier CVE-2025-24033
GHSA Identifier GHSA-27c6-mcxv-x3fh
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-770: Allocation of Resources Without Limits or Throttling
Affected Product @fastify/multipart
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-2025-24033

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

@fastify/multipart fixed: 8.3.1
npm install @fastify/multipart@8.3.1
@fastify/multipart fixed: 9.0.3
npm install @fastify/multipart@9.0.3
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 @fastify/multipart

How to Check if You Are Affected

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

npm ls @fastify/multipart

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

Note: The npm ls @fastify/multipart 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-770: Allocation of Resources Without Limits or Throttling, where the product allocates a reusable resource or group of resources on behalf of an actor without imposing any intended restrictions on the size or number of resources that can be allocated. In @fastify/multipart, 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 The `saveRequestFiles` function does not delete the uploaded temporary files when user cancels the request. ### Patches Fixed in version 8.3.1 and 9.0.3 ### Workarounds Do not use `saveRequestFiles`. ### References This was identified in https://github.com/fastify/fastify-multipart/issues/546 and fixed in https://github.com/fastify/fastify-multipart/pull/567.

CVE-2025-24033 Affected @fastify/multipart Versions

2 component(s)
Fixed Versions:
8.3.19.0.3
Product / Package Ecosystem Affected Versions Fixed Version
@fastify/multipart
npm
< 8.3.1
8.3.1
@fastify/multipart
npm
≥ 9.0.0
< 9.0.3
9.0.3

References

Frequently Asked Questions

What is CVE-2025-24033?
CVE-2025-24033 is a security vulnerability in @fastify/multipart involving Unlimited consumption of resources in @fastify/multipart under CWE-770: Allocation of Resources Without Limits or Throttling.
Which @fastify/multipart versions are affected?
Affected versions include releases prior to 8.3.1, 9.0.3 across affected packages: @fastify/multipart.
What version fixes CVE-2025-24033?
Upgrading to 8.3.1, 9.0.3 (or the latest patched release for your respective branch) resolves the vulnerability.
Is @fastify/multipart affected?
Yes, @fastify/multipart is affected in releases prior to 8.3.1, 9.0.3. Upgrade your dependency to 8.3.1, 9.0.3 or later.
What is the CVSS score of CVE-2025-24033?
CVE-2025-24033 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-2025-24033?
CVE-2025-24033 is classified under CWE-770: Allocation of Resources Without Limits or Throttling (The product allocates a reusable resource or group of resources on behalf of an actor without imposing any intended restrictions on the size or number of resources that can be allocated.).
How can I check npm dependencies for CVE-2025-24033?
Run the dependency tree command: 'npm ls @fastify/multipart'. 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-27c6-mcxv-x3fh",
  "modified" : "2025-01-23T23:17:17Z",
  "published" : "2025-01-23T18:02:07Z",
  "aliases" : [ "CVE-2025-24033" ],
  "summary" : "Unlimited consumption of resources in @fastify/multipart",
  "details" : "### Impact\n\nThe `saveRequestFiles` function does not delete the uploaded temporary files when user cancels the request.\n\n### Patches\n\nFixed in version 8.3.1 and 9.0.3\n\n### Workarounds\n\nDo not use `saveRequestFiles`.\n\n### References\n\nThis was identified in https://github.com/fastify/fastify-multipart/issues/546 and fixed in https://github.com/fastify/fastify-multipart/pull/567.\n",
  "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" : "@fastify/multipart"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "8.3.1"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 8.3.0"
    }
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@fastify/multipart"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "9.0.0"
      }, {
        "fixed" : "9.0.3"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/fastify/fastify-multipart/security/advisories/GHSA-27c6-mcxv-x3fh"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-24033"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/fastify/fastify-multipart/issues/546"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/fastify/fastify-multipart/pull/567"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/fastify/fastify-multipart"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-770" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-01-23T18:02:07Z",
    "nvd_published_at" : "2025-01-23T18:15:33Z"
  }
}