Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessUpload crafted file to Active Storage endpoint
-
DeliveryAttachment triggers ImageMagick analyzer
-
ExploitMalicious coder selected from file content
-
ExecutionArbitrary file write and read of secret_key_base
-
ImpactEscalate to RCE or lateral movement
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V13 - Configuration Secure default settings
|
| Exploitation Conditions | Exploitation requires an application that (1) uses ImageMagick for Active Storage image processing via config.active_storage.variant_processor = :mini_magick (the default only for applications on load_defaults 6.1 or earlier), (2) runs ImageMagick under a security policy that does not already deny the involved coders - the advisory specifically notes the policies packaged by Debian and Ubuntu do not deny them - and (3) allows file uploads from untrusted users. The trigger is minimal: merely attaching an uploaded file runs the ImageMagick analyzer, so no variant, preview, or explicit analyze call is required and no authentication is needed. Arbitrary file READ (e.g. secret_key_base) specifically requires attachments stored with the Disk service; arbitrary file write does not. Applications already on a newer load_defaults without mini_magick, or that already apply a policy denying the MSL/Ghostscript/indirection coders, are not affected. |
| Impact | All severity signals point the same direction and the input's decision framework reflects it: the Rails security team's GHSA advisory confirms an unauthenticated attacker can achieve arbitrary file write and arbitrary file read (including secret_key_base) with the vuln.today Decision label set to act_now. The provided CVSS 3.1 vector (AV:N/AC:L/PR:N/UI:N, C:H/I:H/A:H, score 9.8) is consistent with the advisory: triggering requires only attaching an upload - no variant, preview, or analyze call - so the network/no-privilege/no-interaction metrics are justified. The important nuance is that this is NOT a pure 'default config, always exploitable' 9.8: the advisory states an application is affected only if it meets ALL three conditions (uses ImageMagick via mini_magick, which is the default only on load_defaults 6.1 or earlier; runs ImageMagick under a policy that does not already deny the involved coders - notably Debian/Ubuntu packaged policies do not; and accepts uploads from untrusted users). These are deployment preconditions, not attacker-side complexity, so they do not raise AC, but they do narrow the real-world exploitable population below what a raw 9.8 implies. No EPSS score was provided and the vulnerability is not listed in CISA KEV in the input, so there is no quantitative exploitation-probability or confirmed-active-exploitation signal to compare against; absence of those is not evidence of low risk. No public exploit identified at time of analysis - the advisory notes one specific attack chain was responsibly reported by HackerOne researcher ryotak and explicitly does not assume it is the only one, but no working exploit code is referenced. Net: a genuine high priority for Rails applications meeting the three conditions, consistent with the act_now label. |
| Exploit ScenarioDerived | A Rails application using Active Storage with the mini_magick variant processor allows untrusted users to upload files. An attacker uploads a crafted image file that causes ImageMagick to select a malicious coder (e.g. MSL or an indirection coder) the moment Active Storage's analyzer runs on attachment, with no variant or analyze call needed. This lets the attacker write arbitrary files and, on the Disk service, read files readable by the app process such as secret_key_base and credentials, enabling escalation to RCE or lateral movement. No public exploit identified at time of analysis, though one attack chain was privately reported to the maintainers. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Nov 04, 2026
Unauthenticated attackers can write arbitrary files on a Ruby on Rails host and, when Active Storage uses the Disk service, read arbitrary files such as secret_key_base, by uploading a crafted attachment that ImageMagick analyzes. Exposure requires an application that processes images through mini_magick (the default only under load_defaults 6.1 or earlier), whose host ImageMagick policy does not already deny the MSL, Ghostscript and file/URL indirection coders - the policies shipped by Debian and Ubuntu do not - and that accepts uploads from untrusted users; merely attaching the file is enough, since the analyzer runs on attach and no variant, preview or explicit analyze call is needed. The Rails team rates this act_now and shipped fixes in activestorage 8.1.4.1 and 8.0.5.2 (with patch commits for 8.1 and 8.0); no public exploit identified at time of analysis, though the advisory notes one specific attack chain has already been reported.
RemediationAI
Upgrade the activestorage gem to 8.1.4.1 or 8.0.5.2 per the Rails release pages and advisory GHSA-f3w6-w445-fwh9; applications on the 8.1 line that cannot upgrade immediately can apply commit 468aa9a93fc98f5476b6821770f4ccfcb7f7d328, and 8.0 applications commit ea8c40121ce53a3d0255cd4eb6d13bfe3bc01776. Applications using the :mini_magick variant processor must also run mini_magick >= 5.1, which the policy requires - with an older mini_magick the application raises an exception during boot. Applications that render PostScript or PDF through ImageMagick must re-allow the gs delegate and the coders they use in the host's policy.xml, and applications that replace MiniMagick.cli_env after boot, clear the environment with MiniMagick.cli_prefix or install their own MiniMagick::Shell will not receive the shipped policy and must carry its rules in ImageMagick's system policy. Where upgrading is not yet possible, copy the rules from activestorage/lib/active_storage/image_magick/policy.xml into the system policy (for example /etc/ImageMagick-7/policy.xml), at minimum denying the MSL coder, the Ghostscript coders and the gs delegate. If attachments were stored with the Disk service, treat the instance as compromised and change secret_key_base and every secret readable by the application process, including the master key and everything in config/credentials.yml.enc, storage and database credentials and third-party tokens, without retaining an exposed secret as a fallback.
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
The flaw is an insecure default (CWE-1188) in how Active Storage drives ImageMagick: ImageMagick chooses a coder from the content of the file it is handed, and some coders act on files named inside the image rather than on the image itself - including the MSL scripting coder, Ghostscript-backed PostScript/PDF coders and the gs delegate, and @filename indirection for reading or deleting other files or fetching remote/local references. Active Storage constrained none of these coders, and the ImageMagick analyzer runs as soon as a file is attached, so a crafted upload alone reaches the vulnerable coder without any variant, preview or analyze call. The CPE cpe:2.3:a:rubyonrails:active_storage:*:*:*:*:*:*:*:* covers the gem; the fix ships an ImageMagick policy at activestorage/lib/active_storage/image_magick/policy.xml and prepends its directory to MAGICK_CONFIGURE_PATH through MiniMagick.cli_env, so every ImageMagick process MiniMagick spawns applies it. Because ImageMagick applies every policy.xml on its search path, the shipped policy adds to the host policy rather than replacing it, and it covers all ImageMagick commands MiniMagick runs, not only Active Storage's. The policy mechanism depends on mini_magick >= 5.1, it is bypassed by applications that replace MiniMagick.cli_env after boot, clear the environment with MiniMagick.cli_prefix or install their own MiniMagick::Shell, and GraphicsMagick does not read ImageMagick policies at all. Arbitrary file read specifically requires attachments stored with the Disk service; arbitrary file write does not.
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:N/UI:N/S:U/C:H/I:H/A:H
Merely attaching an untrusted upload triggers it with no auth or interaction (AV:N/AC:L/PR:N/UI:N); arbitrary file read of secrets and arbitrary write enabling RCE justify C:H/I:H/A:H.
Primary rating from Vendor (mitre).
CVSS VectorVendor: mitre
Lifecycle Timeline
2DescriptionCVE.org
The activestorage gem before 8.1.4.1 for Ruby on Rails, when ImageMagick attachment processing occurs, can allow server read and write operations (e.g., reading secret_key_base) because the ImageMagick analyzer runs when a file is attached, and there is not an ImageMagick security policy to block unintended functionality.
Technical POC Analysis
CWE-1188: Initialization of a Resource with an Insecure Default.
Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.
Latest POC
1 PoC candidate from github (unverified)
Sign in to open the public PoC links collected for this CVE.
Executive ViewAI
CVE-2026-122006 is a critical vulnerability in Ruby on Rails applications that use Active Storage with ImageMagick for image processing, allowing unauthenticated attackers to write arbitrary files and potentially read sensitive secrets like secret_key_base. This could lead to full application compromise and data breaches, affecting any organization hosting such Rails applications, especially those with user uploads. Leadership should prioritize immediate remediation because the vulnerability is rated critical and fixes are available.
Vendor-released patch: activestorage 8.1.4.1 and 8.0.5.2 (patch commits for 8.1 and 8.0). If unable to patch immediately, mitigate by hardening ImageMagick policies to deny MSL, Ghostscript, and file/URL coders, and/or disable image analysis in Active Storage by removing mini_magick from the Gemfile, and restrict uploads from untrusted users.
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
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
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 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
Rails Action Pack (ActionDispatch::Cookies) writes upgraded signed and encrypted cookies back into responses even when t
EUVD-2026-116914
GHSA-wgv4-95jc-33jm
NVD
CVE.org
EPSS
VulDB
Exploit-DB