{"schemaVersion":4,"id":"CVE-2026-124289","aliases":[],"status":"published","duplicateOf":null,"title":"@fastify/multipart vulnerable to arbitrary file write via type confusion in saveRequestFiles()","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.","dates":{"published":"2026-11-16T13:09:49.790Z","modified":"2026-11-17T18:07:44.673Z","reserved":null,"kevAdded":[],"kevDue":[]},"cvss":{"headline":{"score":7.5,"severity":"high","version":"3.1","versionLabel":"v3.1","source":"CVE.org","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","computed":false,"selection":"backend-summary"},"metrics":[{"version":"3.1","versionLabel":"v3.1","source":"CVE.org","score":7.5,"severity":"high","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","exploitability":null,"impact":null,"computed":false},{"version":"3.1","versionLabel":"v3.1","source":"NVD","score":7.5,"severity":"high","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","exploitability":null,"impact":null,"computed":false}]},"epss":{"probability":0.00419,"percentile":0.38149,"severity":"low","asOf":"2026-12-04T00:00:00.000Z","change":{"pp":null,"baselineDate":null,"baselineScore":null},"history":[{"date":"2026-11-17T00:00:00.000Z","score":0.00355,"percentile":null},{"date":"2026-11-18T00:00:00.000Z","score":0.00355,"percentile":null},{"date":"2026-11-19T00:00:00.000Z","score":0.00355,"percentile":null},{"date":"2026-11-20T00:00:00.000Z","score":0.00355,"percentile":null},{"date":"2026-11-21T00:00:00.000Z","score":0.00355,"percentile":null},{"date":"2026-11-22T00:00:00.000Z","score":0.00355,"percentile":null},{"date":"2026-11-23T00:00:00.000Z","score":0.00355,"percentile":null},{"date":"2026-11-24T00:00:00.000Z","score":0.00355,"percentile":null},{"date":"2026-11-25T00:00:00.000Z","score":0.0046,"percentile":null},{"date":"2026-11-26T00:00:00.000Z","score":0.0046,"percentile":null},{"date":"2026-11-27T00:00:00.000Z","score":0.0046,"percentile":null},{"date":"2026-11-28T00:00:00.000Z","score":0.0046,"percentile":null},{"date":"2026-11-29T00:00:00.000Z","score":0.0046,"percentile":null},{"date":"2026-11-30T00:00:00.000Z","score":0.0046,"percentile":null},{"date":"2026-12-01T00:00:00.000Z","score":0.00419,"percentile":null},{"date":"2026-12-02T00:00:00.000Z","score":0.00419,"percentile":null},{"date":"2026-12-03T00:00:00.000Z","score":0.00419,"percentile":null},{"date":"2026-12-04T00:00:00.000Z","score":0.00419,"percentile":0.38149}],"last30":[{"date":"2026-11-17T00:00:00.000Z","score":0.00355,"percentile":null},{"date":"2026-11-18T00:00:00.000Z","score":0.00355,"percentile":null},{"date":"2026-11-19T00:00:00.000Z","score":0.00355,"percentile":null},{"date":"2026-11-20T00:00:00.000Z","score":0.00355,"percentile":null},{"date":"2026-11-21T00:00:00.000Z","score":0.00355,"percentile":null},{"date":"2026-11-22T00:00:00.000Z","score":0.00355,"percentile":null},{"date":"2026-11-23T00:00:00.000Z","score":0.00355,"percentile":null},{"date":"2026-11-24T00:00:00.000Z","score":0.00355,"percentile":null},{"date":"2026-11-25T00:00:00.000Z","score":0.0046,"percentile":null},{"date":"2026-11-26T00:00:00.000Z","score":0.0046,"percentile":null},{"date":"2026-11-27T00:00:00.000Z","score":0.0046,"percentile":null},{"date":"2026-11-28T00:00:00.000Z","score":0.0046,"percentile":null},{"date":"2026-11-29T00:00:00.000Z","score":0.0046,"percentile":null},{"date":"2026-11-30T00:00:00.000Z","score":0.0046,"percentile":null},{"date":"2026-12-01T00:00:00.000Z","score":0.00419,"percentile":null},{"date":"2026-12-02T00:00:00.000Z","score":0.00419,"percentile":null},{"date":"2026-12-03T00:00:00.000Z","score":0.00419,"percentile":null},{"date":"2026-12-04T00:00:00.000Z","score":0.00419,"percentile":0.38149}]},"kev":{"state":"not-listed","entries":[],"listedCount":0,"totalCatalogs":3,"catalogs":[{"source":"cisa","label":"CISA","listed":false,"entry":null},{"source":"enisa","label":"ENISA","listed":false,"entry":null},{"source":"circl","label":"CIRCL","listed":false,"entry":null}]},"ransomware":{"state":"none-recorded","sources":[]},"exploits":[],"exploitCount":0,"weaknesses":[{"id":"CWE-22","name":"Improper Limitation of a Pathname to a Restricted Directory","description":"The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.","type":"weakness","status":"Stable","abstraction":"Base","likelihoodOfExploit":"High","url":"https://cwe.mitre.org/data/definitions/22.html"},{"id":"CWE-843","name":"Access of Resource Using Incompatible Type","description":"The product allocates or initializes a resource such as a pointer, object, or variable using one type, but it later accesses that resource using a type that is incompatible with the original type.","type":"weakness","status":"Incomplete","abstraction":"Base","likelihoodOfExploit":null,"url":"https://cwe.mitre.org/data/definitions/843.html"}],"affected":[{"vendor":"@fastify/multipart","product":"@fastify/multipart","name":"@fastify/multipart","label":"@fastify/multipart","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"≥ 7.4.0, < 10.1.9","noFixRecorded":false,"fixedIn":null,"bounds":{"kind":"range","start":"7.4.0","startInclusive":true,"end":"10.1.9","endInclusive":false}}],"versionsText":"≥ 7.4.0, < 10.1.9","eol":null,"hubHref":"/vendor/fastifymultipart/fastifymultipart"}],"affectedCount":1,"eol":{"hasEol":false,"count":0},"references":[{"url":"https://github.com/fastify/fastify-multipart/security/advisories/GHSA-gmhr-r4mc-w935","label":"github.com/fastify/fastify-multipart/security/advisories/GHSA-gmhr-r4mc-w935","hostname":"github.com","tags":[]},{"url":"https://cna.openjsf.org/security-advisories.html","label":"cna.openjsf.org/security-advisories.html","hostname":"cna.openjsf.org","tags":[]}],"lineage":{"upstream":[],"downstream":[],"duplicates":[],"related":[]},"timeline":[{"kind":"published","date":"2026-11-16T13:09:49.790Z","label":"Published","detail":"Vulnerability first disclosed.","source":null},{"kind":"modified","date":"2026-11-17T18:07:44.673Z","label":"Last modified","detail":"Vulnerability information updated.","source":null}],"priority":{"label":"prioritise","tag":"severe","reason":"Severe, CVSS 7.5 (CVE.org); no exploitation reported by the 5 checked sources; EPSS 0% (FIRST, 04-12-2026)","nextStep":"Check applicability: affected before 10.1.9 (CNA); fix release not confirmed","rank":[0,0,0,0,0,75],"checkedSources":["cisa","enisa","circl","shadowserver","cisa-adp"],"evidence":[{"type":"epss","source":"FIRST","date":"2026-12-04T00:00:00.000Z","status":"valid","statusDate":null,"statusSource":null,"disputes":[],"value":0.00419,"stale":false,"promoted":null},{"type":"cvss","source":"cve.org","date":"2026-11-17T18:07:44.673Z","status":"valid","statusDate":null,"statusSource":null,"disputes":[],"score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","version":"3.1","headline":true},{"type":"cvss","source":"nvd","date":"2026-11-17T18:07:44.673Z","status":"valid","statusDate":null,"statusSource":null,"disputes":[],"score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","version":"3.1"},{"type":"adp","source":"cisa-adp","date":"2026-11-17T18:07:31.358Z","status":"valid","statusDate":null,"statusSource":null,"disputes":[],"exploitation":"none"}],"epss":{"value":0.00419,"date":"2026-12-04T00:00:00.000Z","stale":false,"promoted":null},"sources":[{"id":"cisa","lastSuccessfulSync":"2026-12-05T09:01:26.874Z","state":"fresh"},{"id":"enisa","lastSuccessfulSync":"2026-12-05T09:01:27.430Z","state":"fresh"},{"id":"circl","lastSuccessfulSync":"2026-12-05T09:01:27.610Z","state":"fresh"},{"id":"shadowserver","lastSuccessfulSync":null,"state":"unavailable"},{"id":"cisa-adp","lastSuccessfulSync":"2026-12-05T09:01:02.756Z","state":"fresh"},{"id":"epss","lastSuccessfulSync":"2026-12-05T09:01:25.188Z","state":"fresh"},{"id":"osv","lastSuccessfulSync":"2026-12-05T09:01:24.136Z","state":"fresh"}],"feedEvent":null},"meta":{"dataAsOf":"2026-12-05T09:31:51.752Z","stale":false,"partial":false}}