IT SBIT Services
Schneeberger
DEEN
CVE tracker

Rails Active Storage: File read and code execution via tempfile extension

CVE-2026-126186High 8.8

← All vulnerabilities

Summary

Active Storage keeps the uploaded filename's extension on the temporary file it hands to ffprobe, ffmpeg and ImageMagick. These tools pick a decoder from the extension, so an uploader who controls the filename can select the decoder. The AviSynth path can read files the application process can access or load an uploaded native library, which may lead to code execution in the FFmpeg process; other extension-selected decoders may be reachable without AviSynth. The attack requires an application that accepts untrusted uploads and analyzes video or audio, generates video previews, or processes images with ImageMagick.

Affected

  • Rails 8.1 before 8.1.4.1
  • Rails 8.0 before 8.0.5.2
  • Older versions: Unknown.

Fixed in

  • activestorage 8.1.4.1
  • activestorage 8.0.5.2

Workaround

  • Disable video and audio analysis and video previews for untrusted uploads.
  • Stop accepting untrusted uploads, or remove ffmpeg, ffprobe and ImageMagick from hosts where they are not needed.
  • No other vendor workaround is confirmed. Unknown.

Exploitation

  • No known exploitation in the wild at the time of publication.
  • Not listed in CISA KEV.
  • Public proof of concept: Unknown.

Our recommendation

  • Identify Rails applications running activestorage below 8.1.4.1 or 8.0.5.2, and plan an upgrade for any Rails 7.x applications, as no fix is available for them.
  • Upgrade to 8.1.4.1 or 8.0.5.2 together with the ImageMagick fix GHSA-f3w6-w445-fwh9.
  • Check whether untrusted uploads reach analysis or previews, and whether any Windows host runs a GPL FFmpeg build with AviSynth.
  • If exposure is suspected, rotate secret_key_base and cloud storage credentials.

Public exploits

PoC-in-GitHub, Metasploit and Exploit-DB list nothing for this CVE.

Research sources

Researched and written up in English and German by an AI (Claude by Anthropic) based on NVD, CISA, EPSS and the sources listed. The vendor information is authoritative. Researched on 10 Nov 2026, 23:38.

Original description (NVD)

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 ffmpeg.org do. Other decoders that FFmpeg or ImageMagick select from the extension may be reachable without AviSynth. This issue is fixed in versions 8.1.4.1 and 8.0.5.2.

NVD references (5)

Sources

The tracker combines official, freely usable data sources – updated continuously:

This product uses data from the NVD API but is not endorsed or certified by the NVD. EPSS data © FIRST.org.

Affected? We can help.

We check whether your systems are affected, install updates and close the gap – continuously with the System Health Checker if you wish.