# CVE-2025-24033: @fastify/multipart vulnerable to unlimited consumption of resources

> Attackers can cause resource exhaustion by canceling requests, leaving temporary files undeleted in the Fastify multipart plugin.

- **Severity:** High 7.5 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 23 Jan 2025
- **Updated:** 12 Feb 2025
- **Also known as:** GHSA-27c6-mcxv-x3fh

## What is CVE-2025-24033?

CVE-2025-24033 is a high-severity denial of service vulnerability in fastify-multipart, published on 23 Jan 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

@fastify/multipart is a Fastify plugin for parsing the multipart content-type. Prior to versions 8.3.1 and 9.0.3, the `saveRequestFiles` function does not delete the uploaded temporary files when user cancels the request. The issue is fixed in versions 8.3.1 and 9.0.3. As a workaround, do not use `saveRequestFiles`.

Weakness: CWE-770 (Allocation of Resources Without Limits or Throttling)

## Which versions are affected by CVE-2025-24033?

4 open source packages ship an affected version, including @fastify/multipart.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `@fastify/multipart` | npm | All versions | 8.3.1 |
| `@fastify/multipart` | npm | All versions | 8.3.1 |
| `@fastify/multipart` | npm | From 9.0.0 | 9.0.3 |
| `@fastify/multipart` | npm | From 9.0.0 | 9.0.3 |

## How do I fix CVE-2025-24033?

Upgrade @fastify/multipart to a fixed version for your release line: 8.3.1 or 9.0.3.

## Is CVE-2025-24033 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-24033 exists.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2025-24033 and fix it if it is affected.

What it is: CVE-2025-24033 is a high-severity denial of service vulnerability in fastify-multipart, published on 23 Jan 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-24033 exists.

Affected packages and fixed versions:
- @fastify/multipart (npm): affected all versions; fixed in 8.3.1
- @fastify/multipart (npm): affected all versions; fixed in 8.3.1
- @fastify/multipart (npm): affected from 9.0.0; fixed in 9.0.3
- @fastify/multipart (npm): affected from 9.0.0; fixed in 9.0.3

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2025-24033/ (Markdown: https://insights.sbomify.com/CVE-2025-24033/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2025-24033
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2025-24033
- OSV: https://osv.dev/vulnerability/CVE-2025-24033

---
From sbomify Insights: https://insights.sbomify.com/CVE-2025-24033/
Summaries are generated and may contain mistakes; the official description above is the record.
