CVE-2026-124289
Fastify Multipart arbitrary file write in saveRequestFiles()
An unauthenticated remote attacker can write chosen files to arbitrary paths on the server via crafted requests.
Texto original en inglés · Ver en español
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
Fuente: CNA
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | CVE-2026-124289 divulgada · CVSS 7.5 (CNA) | |
| Remediación | Parche 10.1.9 | @fastify/multipart · 0 d desde divulgación | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Fuente: NIST NVD | Registro visto por primera vez en NIST NVD | |
| Monitoreo | Fuente: ENISA EUVD | Registro visto por primera vez en ENISA EUVD | |
| Divulgación | Evaluación SSVC | CISA-ADP · explotación ninguna | |
| Divulgación | Modificada | Última actualización del registro | |
| Monitoreo | Fuente: OSV | Registro visto por primera vez en OSV | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
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.
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.
Descripción original del registro (openjs)
@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.
Condiciones y alcance
Desglose de métricas
Rangos afectados
Estado del parche por paquete
| Paquete / producto | Estado | Corregida en | Desde divulgación | Última versión |
|---|---|---|---|---|
npm@fastify/multipart |
Corregida | 10.1.9 | 0 d | 10.1.9 no afectada |
10.1.9Arsenal público
Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.
https://github.com/fastify/fastify-multipart/security/advisories/GHSA-gmhr-r4mc-w935https://cna.openjsf.org/security-advisories.htmlLas referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
