@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.
Project Subscriptions
No data.
Advisories
No advisories yet.
Fixes
Solution
No solution given by the vendor.
Workaround
No workaround given by the vendor.
References
History
Mon, 16 Nov 2026 13:45:00 +0000
| Type | Values Removed | Values Added |
|---|---|---|
| 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. | |
| Title | @fastify/multipart vulnerable to arbitrary file write via type confusion in saveRequestFiles() | |
| Weaknesses | CWE-22 CWE-843 |
|
| References |
| |
| Metrics |
cvssV3_1
|
Projects
Sign in to view the affected projects.
Status: PUBLISHED
Assigner: openjs
Published:
Updated: 2026-11-16T13:09:49.790Z
Reserved: 2026-11-07T10:46:50.314Z
Link: CVE-2026-124289
No data.
Status : Received
Published: 2026-11-16T14:17:05.990
Modified: 2026-11-16T14:17:05.990
Link: CVE-2026-124289
No data.
OpenCVE Enrichment
Updated: 2026-11-16T14:30:05Z