本文へ移動
English version →
高 7.5

@fastify/multipartに認証なしで任意のパスへファイルを書き込まれる脆弱性

CVE-2026-124289 SecPulse初出

概要

攻撃者が認証なしで、細工したリクエストから任意の相対パスへファイルを書き込める脆弱性です。7.4.0以降10.1.9未満の@fastify/multipartが対象で、attachFieldsToBodyオプションを使う場合に影響します。修正版の10.1.9へ更新してください。

AI要約

SecPulse が外部の生成 AI を使って作った要約です。誤りを含むことがあります。重要な判断の前に、下の原文と参照URLを確認してください。

攻撃者が認証なしで、細工したリクエストから任意の相対パスへファイルを書き込める脆弱性です。7.4.0以降10.1.9未満の@fastify/multipartが対象で、attachFieldsToBodyオプションを使う場合に影響します。修正版の10.1.9へ更新してください。

影響パッケージ

パッケージ影響を受ける版 → 修正版
@fastify/multipart@fastify/multipart
7.4.0 以上 10.1.9 未満→ 10.1.9
原文の説明 取得元が公開している説明をそのまま載せています (多くは英語)。

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

出典: CVE.org (CVE Program・cvelistV5) NVD GitHub Advisory

参照URL

当サイトでは、アクセス解析と広告の効果測定のためにCookieを使います。株式会社Gameのサイト共通の設定です。 詳しく