Skip to main content

CVE-2026-126186 — Vulnerability in activestorage — CVE Details

HIGH

Active Storage: Possible arbitrary file read and remote code execution in video previews, analysis and image processing

Published November 10, 2026Updated November 10, 2026Source: OSV

What Should I Do?

Address in Next Maintenance Window

Low exploitation probability (0.48%). Schedule for your next planned update.

Does your project use an affected activestorage version?

Paste your Gemfile.lock to check it for CVE-2026-126186 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.

Check my Gemfile.lock

Summary

Impact

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.

Details

The fixed releases keep the uploaded extension on the tempfile only when Marcel maps that extension to the blob's recorded content type, and name the tempfile with no extension otherwise. A form upload whose Rack tempfile fails the same check is copied to a correctly named tempfile before processing. Files whose uploaded extension disagrees with their content type are still processed; the external tool detects their format from the content. The Active Storage CHANGELOG describes the change.

Affected applications

An application is affected if it meets all of these requirements:

  • Accepts uploads from untrusted users.
  • Analyzes video or audio attachments (which Active Storage does on attach by default), 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.

Mitigation

  • Upgrade to a fixed version of activestorage.

Expire and change secrets

Upgrading closes the vulnerability but does not undo a disclosure that already occurred. An application that meets the AviSynth requirement above should treat every secret readable by the application process as potentially exposed and change it, including secret_key_base, the master key and everything in config/credentials.yml.enc that it decrypts, the Active Storage service credentials, database credentials, and tokens for third-party services. Changing secret_key_base expires active sessions and invalidates signed and encrypted cookies, signed global IDs and Active Storage URLs. Do not retain an exposed secret as a fallback.

Workarounds

Applications that cannot upgrade can stop Active Storage from running FFmpeg on uploaded files by removing ActiveStorage::Previewer::VideoPreviewer from config.active_storage.previewers, and ActiveStorage::Analyzer::VideoAnalyzer and ActiveStorage::Analyzer::AudioAnalyzer from config.active_storage.analyzers. Running an FFmpeg built without AviSynth support closes the AviSynth attack but not the extension-selected decoders of ImageMagick.

Releases

The fixed releases are available at the normal locations.

Patches for those who cannot upgrade at once:

Versions affected

  • activestorage < 8.0.5.2
  • activestorage >= 8.1, < 8.1.4.1

Credit

This issue was responsibly reported by HackerOne researcher pirikara.

Advisory Timeline

  • First published November 10, 2026 (16 days ago).
  • Last revised November 10, 2026 — 0 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

Bundler
Update activestorage to 8.1.4.1 or later
gem install activestorage -v 8.1.4.1
Bundler
Update activestorage to 8.0.5.2 or later
gem install activestorage -v 8.0.5.2

After upgrading, scan your dependencies again to confirm the vulnerability is resolved.

Affected Packages (2)

Affects 1 ecosystem: RubyGems (1).

PackageFixed In
activestorage RubyGems · Affected: 8.1.0, 8.1.0.beta1, 8.1.0.rc1, 8.1.1 (+5 more)8.1.4.1
activestorage RubyGems · Affected: 0.1, 5.2.0, 5.2.0.beta1, 5.2.0.beta2 (+173 more)8.0.5.2

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 8.8 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Frequently Asked Questions

What is CVE-2026-126186?
Active Storage: Possible arbitrary file read and remote code execution in video previews, analysis and image processing. This vulnerability has been assigned a severity rating of HIGH (CVSS score: 8.8/10).
How do I check if my project is affected by CVE-2026-126186?
CVE-2026-126186 affects activestorage. It has a 0.5% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-126186 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
8.8

Significant impact if exploited, or exploitable with modest effort.

EPSS Score (30-day exploit probability)
0.48%
EPSS percentile: 33.7

This is a below-median EPSS score — only 33.7% of tracked vulnerabilities score at or below it, so most tracked vulnerabilities are considered more likely to be exploited than this one.

Also Known As

GHSA-v924-7rp8-4mxh

Related CVEs

Check your own dependencies

Free, with no signup for up to 10 packages.

Check my Gemfile.lock