Skip to main content

@fastify/multipart CVE-2026-124289

| EUVDEUVD-2026-126375 HIGH
Path Traversal (CWE-22)
2026-11-16 openjs
7.5
CVSS 3.1 · Vendor: openjs
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Send crafted JSON request to upload endpoint
  2. Delivery
    Forge object with truthy file/_buf and traversal filename
  3. Exploit
    Type confusion treats body as uploaded file
  4. Execution
    saveRequestFiles writes bytes bypassing hooks and limits
  5. Persist
    Application uses verbatim filename as destination
  6. Impact
    Arbitrary relative-path file write

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Path canonicalization, traversal prevention
MITRE ATT&CK

2 techniques across 2 tactics: Discovery, Collection

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires that @fastify/multipart be registered with the attachFieldsToBody option set to true or 'keyValues', that a request handler call request.saveRequestFiles(), and that the application use the returned file.filename as a write destination (as the project README example does). Given those conditions, no authentication or user interaction is needed (PR:N/UI:N) and a single plain JSON request or JSON-typed multipart field suffices. LIMITING FACTORS: integrations that do not enable attachFieldsToBody, that gate saveRequestFiles() behind request.isMultipart(), or that apply path.basename()/an allowlist to filenames before using them as destinations are not exploitable; this is why the flaw does not affect every deployment of the plugin despite the network-unauthenticated vector.

Impact

The input CVSS 3.1 vector (AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N, base 7.5) describes a network-reachable, unauthenticated, low-complexity integrity-only flaw, consistent with the GHSA advisory's account of a single-request arbitrary relative-path file write via type confusion (CWE-843) leading to path traversal (CWE-22). No EPSS score, no CISA KEV listing, and no confirmed public exploit were supplied, so exploitation status is 'no public exploit identified at time of analysis' - this is NOT zero-day or in-the-wild. The vuln.today Decision label is 'this_week' (not act_now/emergency), aligning with a serious-but-not-fire-drill priority. A key caveat: the CVSS PR:N reflects that no authentication is needed, but real exploitation is gated by application-side conditions the base score does not capture - the plugin must be registered with attachFieldsToBody true or 'keyValues', AND the application must use the returned filename as a write destination (as the README example does). So raw CVSS somewhat overstates universal risk: default/hardened integrations are not exploitable, while vulnerable integrations face genuine unauthenticated arbitrary file write. No conflicting signals between vector and description; the main uncertainty is EPSS/KEV data simply being absent rather than contradictory.

Exploit ScenarioDerived

An unauthenticated attacker sends a single plain application/json request (or a JSON-typed multipart field) to an endpoint whose handler calls request.saveRequestFiles(), forging an object with truthy file and _buf/buffer properties and a filename like '../../../../package.json'. The plugin writes the attacker-chosen bytes and preserves the traversal filename verbatim, skipping the onFile hook and the files/fileSize limits; if the application uses that filename as a write destination, attacker bytes land at an arbitrary relative path. No public exploit code is identified at time of analysis, though the mechanism is fully detailed in the GHSA advisory.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.4% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Nov 16, 2026

Arbitrary relative-path file write in the Fastify multipart plugin (@fastify/multipart 7.4.0 through 10.1.8) lets an unauthenticated remote client forge a file entry through a plain JSON request or a JSON-typed multipart field and have attacker-chosen bytes written to the temporary directory, bypassing the onFile hook and the files/fileSize limits. Because the forged filename is preserved verbatim instead of being reduced to its basename, applications that use the returned file.filename as a write destination - as the project README example does - can be driven to write outside the intended directory in a single request. Impact is integrity-only (CVSS 3.1 base 7.5, AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N); exploitation requires the plugin to be registered with attachFieldsToBody and a handler that calls saveRequestFiles(), so deployments without that configuration or that sanitize filenames are not affected. Active exploitation is not confirmed (no CISA KEV listing) and no public exploit has been identified at time of analysis; the fix is @fastify/multipart 10.1.9.

RemediationAI

Upgrade @fastify/multipart to 10.1.9 or later (vendor-released patch: 10.1.9), which fixes the saveRequestFiles() type confusion and applies basename normalization to forged entries as it does for genuine multipart filenames. If upgrading immediately is not possible, the advisory describes two workarounds: call request.saveRequestFiles() only after confirming request.isMultipart() returns true (this rejects the plain-JSON and JSON-typed-field paths that carry the forged object, at the cost of no longer supporting those non-multipart call patterns), and reduce every returned file.filename to its basename with path.basename() or validate it against an allowlist before using it as a write destination (this limits where a forged name can land but does not restore the skipped onFile hook or files/fileSize limits). Applications that do not need attachFieldsToBody can also avoid the vulnerable code path by not enabling that option, though this changes how field data is exposed to handlers. Details are in the advisory at https://github.com/fastify/fastify-multipart/security/advisories/GHSA-gmhr-r4mc-w935.

Affected VersionsENISA

@fastify/multipart 7.4.0 <10.1.9

Affected Packages

euvd fastify_multipart fix: 10.1.9

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The flaw is a type confusion (CWE-843) that yields a path traversal (CWE-22) in the Node.js Fastify ecosystem. When @fastify/multipart is registered with attachFieldsToBody: true or 'keyValues', the parsed request body is attached to request.body, and a non-multipart request such as application/json is passed through with its JSON body intact; a JSON-typed multipart field is likewise parsed into a plain object. saveRequestFiles() distinguishes uploaded files by shape rather than provenance, so any body object carrying truthy file and _buf properties is accepted as a file, its _buf contents are written into the temporary directory, the onFile hook and the files/fileSize limits are never consulted, and the returned values become attacker-controlled. Genuine multipart filenames are normalized to their basename, but the forged entry keeps its filename verbatim, so a value such as ../../../../package.json retains parent-directory segments. The advisory classifies the issue under both CWE-22 and CWE-843; the practical consequence is limited to integrity (arbitrary relative-path writes), with no confidentiality or availability impact assessed. Affected package coordinates are npm @fastify/multipart (CPE cpe:2.3:a:@fastify/multipart:@fastify/multipart), vulnerable from 7.4.0 up to but excluding 10.1.9.

Know when Fastify Multipart gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (openjs) PRIMARY 7.5 HIGH
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
vuln.today AI 7.5 HIGH

Single unauthenticated network request (AV:N/AC:L/PR:N/UI:N) yields attacker-controlled file write (I:H) with no disclosure and no confirmed availability impact (C:N/A:N).

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N

Primary rating from Vendor (openjs).

CVSS VectorVendor: openjs

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
High
Availability
None

Lifecycle Timeline

2
Patch available
Nov 16, 2026 - 15:02 EUVD
CVE Published
Nov 16, 2026 - 13:09 cve.org
HIGH 7.5

DescriptionCVE.org

@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.

Technical POC Analysis

CWE-22 (path traversal), chained with CWE-843 (type confusion) as scored in GHSA-gmhr-r4mc-w935.

Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.

Executive ViewAI

Why It Matters

A high-severity flaw in the widely used @fastify/multipart Node.js plugin allows an unauthenticated remote attacker to write attacker-controlled files to the temporary directory and, in affected applications, outside intended directories in a single request. Leadership should care because any customer-facing service built on the plugin's documented saveRequestFiles() pattern with attachFieldsToBody may be exposed to data integrity compromise; exploitation is not confirmed. Prioritization should reflect the large footprint of Fastify-based APIs and file-upload workflows across engineering.

Business Impact: High
Compensating Controls

No vendor-released patch identified at time of analysis. Interim mitigations: sanitize file.filename to basename and enforce path containment before any write, reject file entries originating from JSON-typed multipart fields or plain JSON bodies, avoid or restrict attachFieldsToBody/saveRequestFiles() configurations until patched, and monitor temp directories for unexpected writes.

Threat Intelligence Overview

EPSS Score
0.4%
Top 70% exploitable
Prevalence
Medium
official Fastify upload plugin, popular but needs specific attachFieldsToBody config
Data Quality
5 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.4%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
Yes
Human Impact
High
Technical Impact
Partial

Priority Score

38
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +38
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy