Skip to content
High 8.8

Railsのサーバーで任意のファイルを読まれたりコードを実行されたりする脆弱性

CVE-2026-126186 First seen on SecPulse

Summary

Active Storageの動画プレビュー・解析・画像処理に、アップロードされたファイル名の拡張子によって別の処理系が選ばれてしまう脆弱性があります。影響するのはRailsの8.1.4.1より前と8.0.5.2より前で、信頼できない利用者からのアップロードを受け付けている場合が対象です。修正版は8.1.4.1と8.0.5.2です。FFmpegでAviSynthを有効にした特殊な構成でなければ悪用は難しいとされていますが、修正版への更新を急いでください。

AI summary

Produced by SecPulse using an external AI model; it may contain mistakes. Check the original description and references below before acting on it.

Active Storageの動画プレビュー・解析・画像処理に、アップロードされたファイル名の拡張子によって別の処理系が選ばれてしまう脆弱性があります。影響するのはRailsの8.1.4.1より前と8.0.5.2より前で、信頼できない利用者からのアップロードを受け付けている場合が対象です。修正版は8.1.4.1と8.0.5.2です。FFmpegでAviSynthを有効にした特殊な構成でなければ悪用は難しいとされていますが、修正版への更新を急いでください。

Affected packages

PackageAffected → Fixed
railsrails —
RubyGemsactivestorage
< 8.0.5.2→ 8.0.5.2

Fix status by distribution

Records published by each distribution for this CVE. Fixed versions differ by release; check each link.

Original description The description as published by the source.

Active Storage makes it simple to upload and reference files in cloud services and attach those files to Active Record objects. Prior to 8.1.4.1 and 8.0.5.2, ActiveStorage::Blob#open writes a blob to a tempfile whose name carries the extension of the uploaded filename, and hands that path to ffprobe (VideoAnalyzer, AudioAnalyzer), ffmpeg (VideoPreviewer) and ImageMagick (ImageAnalyzer, the :mini_magick variant processor). These tools select a decoder from the file extension when the content does not identify its own format, so an attacker who chooses the filename and declares the content type of an upload chooses which decoder processes it. An FFmpeg built with AviSynth support treats a file with the .avs extension as an AviSynth script and evaluates it, which could disclose files readable by the application process through the preview image, or load a native library the attacker has also uploaded, possibly leading to remote code execution in the FFmpeg process. ImageMagick selects its coders and delegates from the extension in the same way. An application is affected if it accepts uploads from untrusted users and analyzes video or audio attachments, generates video previews, or processes images with ImageMagick. The AviSynth attack additionally requires an FFmpeg built with --enable-avisynth and the AviSynthPlus runtime on the host. Upstream FFmpeg and the common Linux distribution and Homebrew packages do not enable it; the GPL builds distributed for Windows and Linux from…

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

References

We use cookies for analytics and ad measurement. This setting applies to all Game co., Ltd. sites. Details