UBUNTU-CVE-2026-126186: Medium severity ubuntu/rails vulnerability
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 :minimagick 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.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
Active Storageto a version that resolves this vulnerability.Fixed in 8.1.4.1 - Upgrade
Upgrade
Active Storageto a version that resolves this vulnerability.Fixed in 8.0.5.2
Event History
Frequently Asked Questions
Which deployments are exposed?
Applications that accept uploads from untrusted users are affected when they analyze video or audio attachments, generate video previews, or process images through the affected Active Storage analyzers or processors. Exposure depends on those upload-processing features being enabled and used.
What does an attacker need to control?
The attacker needs to be able to upload a file and choose its filename and declared content type. This can cause downstream tools to select a decoder based on the uploaded file extension when the content does not identify its own format.
When could this lead to file disclosure or code execution?
If FFmpeg is built with AviSynth support, an uploaded .avs file can be evaluated as an AviSynth script. This could disclose files readable by the application process through a preview image, or potentially load an attacker-uploaded native library and execute code in the FFmpeg process.
How can teams determine whether they need to remediate?
Check whether the application uses an Active Storage version earlier than 8.1.4.1 or 8.0.5.2, accepts untrusted uploads, and invokes video, audio, preview, or ImageMagick processing. Also determine whether the deployed FFmpeg includes AviSynth support, as that affects the .avs attack path.