Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessUpload file with attacker-chosen name/content-type
-
DeliveryBlob#open writes tempfile keeping malicious extension
-
ExploitExternal tool selects decoder from extension
-
ExecutionFFmpeg evaluates .avs AviSynth script
-
PersistRead app-readable files or load uploaded native library
-
ImpactDisclose secrets via preview or execute code in FFmpeg
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A06:2025 - Insecure Design
ASVS 5.0
V5 - File Handling File extension validation
|
| Exploitation Conditions | The application must (1) accept file uploads from untrusted users and (2) analyze video/audio attachments (Active Storage does this on attach by default), generate video previews, or process images with ImageMagick ( |
| Impact | Signals are moderately concerning but conditional. The input CVSS is 8.8 (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H), implying network-reachable, low-complexity, low-privilege exploitation with full CIA impact. However, the vendor advisory makes clear the worst outcome (RCE via FFmpeg's AviSynth demuxer on a |
| Exploit ScenarioDerived | An attacker who can upload an attachment to a Rails app that analyzes audio/video or processes images picks the filename and declared content type so the tempfile Active Storage hands to ffprobe/ffmpeg/ImageMagick carries an attacker-chosen extension (e.g. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Nov 10, 2026
Active Storage in Rails lets an untrusted uploader who controls both the filename extension and declared content type steer ffprobe, ffmpeg or ImageMagick to an attacker-chosen decoder, which can disclose files readable by the application process through previews and, under a non-default AviSynth-enabled FFmpeg build, possibly execute code in the FFmpeg process. Affected applications accept untrusted uploads and analyze audio/video attachments (default on attach), generate video previews, or process images with ImageMagick; the assessed vector is AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:L/A:L, and the AviSynth RCE path additionally requires an FFmpeg built with --enable-avisynth plus AviSynthPlus on the host. No public exploit identified at time of analysis.
RemediationAI
Vendor-released patch: upgrade activestorage to 8.0.5.2 or 8.1.4.1. For branches that cannot upgrade immediately, the vendor provides patch commits for 8.1 at https://github.com/rails/rails/commit/72136ff39153bc8d63ecbc899993848eb3d6573e.patch and for 8.0 at https://github.com/rails/rails/commit/8106938fb0a595f11006dd1497cd409e27d7d636.patch. Applications that cannot upgrade or patch can stop Active Storage from running FFmpeg on uploaded files by removing ActiveStorage::Previewer::VideoPreviewer from config.active_storage.previewers and removing ActiveStorage::Analyzer::VideoAnalyzer and ActiveStorage::Analyzer::AudioAnalyzer from config.active_storage.analyzers; running an FFmpeg built without AviSynth closes the AviSynth attack but not the extension-selected decoders of ImageMagick. Because the flaw can disclose files readable by the application process, an application that meets the AviSynth requirement should treat secret_key_base, the master key and everything config/credentials.yml.enc decrypts, Active Storage service credentials, database credentials, and third-party service tokens as potentially exposed and rotate them; changing secret_key_base expires active sessions and invalidates signed and encrypted cookies, signed global IDs, and Active Storage URLs, and an exposed secret should not be retained as a fallback. Advisory: https://github.com/rails/rails/security/advisories/GHSA-v924-7rp8-4mxh.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 2 packages in rubygems, euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
CWE-646 (Reliance on File Name or Extension of Externally-Supplied File) describes the root cause: ActiveStorage::Blob#open created a tempfile named from the uploaded filename, including its extension, and passed that path to external tools. VideoAnalyzer and AudioAnalyzer invoke ffprobe, VideoPreviewer invokes ffmpeg, and ImageAnalyzer plus the :mini_magick variant processor invoke ImageMagick. When the content does not identify its own format, these tools select a decoder from the extension, so an uploader who controls the filename and declared content type can influence decoder selection. FFmpeg built with --enable-avisynth treats a .avs file as an AviSynth script; the independent assessment confirms this path requires the AviSynthPlus runtime and is not present in upstream FFmpeg or common Linux distribution and Homebrew packages, but is present in ffmpeg.org GPL Windows/Linux builds. The same extension-selection mechanism can reach other FFmpeg and ImageMagick decoders and delegates without AviSynth, so file-read exposure is broader than the RCE path. The supplied CPE is pkg:rubygems/activestorage. The fixed releases keep the uploaded extension only when Marcel maps that extension to the blob's recorded content type and otherwise name the tempfile with no extension; a form upload whose Rack tempfile fails the same check is copied to a correctly named tempfile before processing.
Know when Ruby On Rails gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Network-reachable via upload (AV:N) with low privilege (PR:L), but full RCE depends on a non-default AviSynth-enabled FFmpeg (AC:H); reliable impact is file disclosure (C:H), so I/A set low.
Primary rating from Vendor (https://github.com/rails/rails).
CVSS VectorVendor: https://github.com/rails/rails
DescriptionCVE.org
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:
- 8.1: https://github.com/rails/rails/commit/72136ff39153bc8d63ecbc899993848eb3d6573e.patch
- 8.0: https://github.com/rails/rails/commit/8106938fb0a595f11006dd1497cd409e27d7d636.patch
Versions affected
- activestorage < 8.0.5.2
- activestorage >= 8.1, < 8.1.4.1
Credit
This issue was responsibly reported by HackerOne researcher pirikara.
Technical POC Analysis
CWE-646, reliance on file name or extension of an externally supplied file.
Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.
Executive ViewAI
CVE-2026-126186 is a high-severity vulnerability in Active Storage, Rails' built-in file upload and processing component, allowing attackers to manipulate file metadata to coerce media processors into executing attacker-chosen decoders. This could expose sensitive files accessible to the application process; under uncommon FFmpeg configurations, remote code execution is possible. Organizations using Active Storage to handle untrusted uploads (e.g., user avatars, audio/video attachments) must prioritize remediation.
Apply vendor patch.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.
More in Ruby On Rails
View alllib/active_support/json/backends/yaml.rb in Ruby on Rails 2.3.x before 2.3.16 and 3.0.x before 3.0.20 does not properly
active_support/core_ext/hash/conversions.rb in Ruby on Rails before 2.3.15, 3.0.x before 3.0.19, 3.1.x before 3.1.10, an
Action Pack in Ruby on Rails before 3.2.22.2, 4.x before 4.1.14.2, and 4.2.x before 4.2.5.2 allows remote attackers to e
actionpack/lib/action_view/lookup_context.rb in Action View in Ruby on Rails 3.x before 3.2.16 and 4.x before 4.0.2 allo
Unauthenticated attackers can write arbitrary files on a Ruby on Rails host and, when Active Storage uses the Disk servi
Unauthenticated remote code execution is achievable in Square Squash (all versions through commit e73f280) through a two
SQL injection vulnerability in the 'order' method in Ruby on Rails 5.1.4 and earlier allows remote attackers to execute
SQL injection vulnerability in the 'reorder' method in Ruby on Rails 5.1.4 and earlier allows remote attackers to execut
SQL injection vulnerability in the Active Record component in Ruby on Rails before 3.0.18, 3.1.x before 3.1.9, and 3.2.x
The Active Record component in Ruby on Rails before 3.0.14, 3.1.x before 3.1.6, and 3.2.x before 3.2.6 does not properly
ActiveRecord in Ruby on Rails before 2.3.17 and 3.x before 3.1.0 allows remote attackers to cause a denial of service or
Authenticated store customers can seize other shoppers' guest carts in Spree Commerce by calling PATCH /api/v3/store/car
EUVD-2026-122941
GHSA-v924-7rp8-4mxh
NVD
CVE.org
EPSS
Exploit-DB