Incomplete Cleanup Affecting @fastify/multipart package, versions <10.1.1


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.34% (28th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-JS-FASTIFYMULTIPART-18853842
  • published16 Aug 2026
  • disclosed15 Aug 2026
  • creditiaohkut-from-NightWolf-Team

Introduced: 15 Aug 2026

NewCVE-2026-18549  (opens in a new tab)
CWE-459  (opens in a new tab)

How to fix?

Upgrade @fastify/multipart to version 10.1.1 or higher.

Overview

@fastify/multipart is a Multipart plugin for Fastify

Affected versions of this package are vulnerable to Incomplete Cleanup due to the saveRequestFiles() multipart upload handling in index.js. An attacker can hang a request and leave temporary files behind by sending a file part that exceeds the fileSize limit and aborting before the multipart boundary is complete. When an application calls request.saveRequestFiles() on untrusted uploads, the request handler never settles and the temp file in os.tmpdir() is not removed. Repeating the request can exhaust disk space and worker or event-loop capacity, preventing normal file upload handling.

Workarounds

  • Set throwFileSizeLimit: false to avoid the saveRequestFiles() code path that drops the stream reference after a fileSize truncation, which prevents the hang and temp-file leak on aborted uploads.

CVSS Base Scores

version 4.0
version 3.1