本文へ移動

#CVE-2026-124289

脆弱性の一覧へ戻る

編集部の見出し:@fastify/multipart 7.4.0〜10.1.8:attachFieldsToBody 有効時に偽のアップロードで任意の場所へ書き込み

CVE(NVD)CVSS 7.5 HighEPSS 0.4%

NVD の情報

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

公開日
2026-11-16
最終更新(NVD)
2026-11-17
NVD の状態
Awaiting Analysis
脆弱性の種類
CWE-22、CWE-843

深刻度(CVSS)

  • 7.5 HighCVSS 3.1/副/評価:ce714d77-add3-4f53-aff5-83d477b104bbCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N

悪用の状況

CISA KEV には掲載されていません(掲載されていないことは、悪用されていないことの証明ではありません)。

EPSS:今後30日に悪用される推定確率 0.36%(全体の上位 70.2%、評価日 2026-11-18)

解消方法

  • @fastify/multipart のバージョンアップ10.1.9 以降根拠:公告(編集部の転記)
  • 回避策(設定変更など)根拠:公告(編集部の転記)

「NVD の条件から推定」は、NVD が影響ありとする版の上限から読み取ったもので、修正版とは限りません。「解消方法の情報なし」は、修正が無いという意味ではありません。必ずベンダーの公告で確認してください。

編集部の記載(レポート掲載時)

レポートの編集部がベンダー公告などから転記した内容です。検証済みの値ではないため、必ず出典で確認してください。

2026-11-16 のレポート@fastify/multipart 7.4.0〜10.1.8:attachFieldsToBody 有効時に偽のアップロードで任意の場所へ書き込み

Fastify の公式アップロードプラグイン。attachFieldsToBody が true か keyValues のとき、saveRequestFiles() が JSON の file と _buf を持つ値を本物のアップロードとして一時フォルダに保存する。ファイル名は加工されず、保存先に使うアプリでは相対パスで任意のファイルを書き換えられる。認証不要。

悪用状況(編集部):悪用の報告は確認されていない

公告に記載の修正版

  • @fastify/multipart 10.1.9公告

公告に記載の回避策

  • saveRequestFiles() を呼ぶ前に request.isMultipart() で確かめる。file.filename に path.basename() をかけるか許可リストで照合してから保存先に使う公告

参照(NVD)

NVD から取得:2026-11-18T15:10:32.868Z/EPSS 評価日:2026-11-18

This product uses the NVD API but is not endorsed or certified by the NVD.

悪用の確認情報は CISA Known Exploited Vulnerabilities Catalog(NVD 経由で取得)によります。EPSS は FIRST(www.first.org/epss)によります。