Patch Ticker
EnglishEN
Elevated

@fastify/multipart arbitrary relative-path file write in upload handling

CVE-2026-124289

Upload helpers in some Fastify apps let attackers save files anywhere.

CVE
CVE-2026-124289 (opens in a new tab)
Score
CVSS 7.5
First seen

Mitigation

Update @fastify/multipart to 10.1.9 or later. Until then, call saveRequestFiles only after confirming the request is multipart, and reduce each returned filename to its basename or validate it against an allowlist.

Summary

A forged object in the request body can make the plugin save attacker-chosen bytes under an attacker-chosen filename. Filenames with parent directory segments can then write files to arbitrary locations, affecting versions 7.4.0 through 10.1.8.

Affected when

  • attachFieldsToBody option enabled
  • app uses the filename from saveRequestFiles as a write destination

1 other Incident of this product in the last 30 days

Incidents by product: @fastify/multipart

Other recent Incidents of @fastify/multipart

All Incidents of 2026-11-16

Read the CVE record · cve.org (opens in a new tab)