Rails Active Storage CVE-2025-24293
CRITICALAttack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessIdentify endpoint passing input to variant
-
DeliverySend crafted transformation method/params
-
ExploitBypass allow-list via circumvention method
-
ExecutionInject command into ImageMagick call
-
ImpactExecute arbitrary OS commands on server
Vulnerability Assessment
| Weakness |
CWE
MITRE ATT&CK
1 technique across 1 tactic: Execution The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires the application to use Active Storage with the image_processing gem AND the MiniMagick processor (ImageMagick backend), AND to pass arbitrary untrusted user input as the variant transformation method or its parameters (e.g. |
| Impact | Signals are mixed and must be weighed together. The CVSS 4.0 vector (AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H, score 9.2) reflects high technical impact (full confidentiality/integrity/availability loss) reachable over the network without privileges or user interaction - but it critically includes AT:P, an Attack Requirement, meaning successful exploitation depends on a precondition: the application must actually pass untrusted user input into transformation methods/parameters, behavior Rails explicitly documents as unsupported and dangerous. This is therefore not exploitable against a default Rails app; it requires an insecure application coding pattern plus the image_processing + MiniMagick stack. EPSS is low (0.22%, 44th percentile) and no POC is identified, consistent with a vulnerability gated behind non-default, developer-introduced usage rather than a universally exploitable flaw. It is not in CISA KEV. Net: a genuinely high-severity, RCE-class issue worth prompt patching, but real-world exposure is narrow and conditional on application code, not a mass-exploitable internet-wide bug. |
| Exploit ScenarioDerived | An application renders user-customizable image variants, e.g. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv5 – Jun 30, 2026
Command injection in Ruby on Rails Active Storage allows attackers to abuse a permissive default allow-list of image transformation methods, escaping the framework's safe-transformation guardrails when an application forwards untrusted input as the transformation method or its parameters. Three methods on the default allow-list can be used to circumvent the safe defaults and reach the underlying ImageMagick processor, enabling OS command injection (CVSS 4.0 9.2). No public exploit has been identified at time of analysis, and EPSS is low at 0.22% (44th percentile), but a vendor patch is available and the issue is RCE-class.
Earlier versions of this analysis (4)
Command injection in Ruby on Rails Active Storage (>= 5.2.0) lets remote attackers execute arbitrary commands when an application passes untrusted user input as image transformation method names or parameters. Active Storage's default allow-list includes three methods that can circumvent its safe defaults, but exploitation requires the app to use the image_processing gem with the mini_magick processor and to feed user-controlled input into blob.variant. No public exploit has been identified at time of analysis, and EPSS is low (0.22%); a vendor patch is available.
Command injection in Ruby on Rails Active Storage (>= 5.2.0) allows attackers to circumvent the safe-default image transformation allow-list when an application passes untrusted user input as transformation method names or parameters. The default allow-list contains three methods that can be abused to reach unsafe MiniMagick/ImageMagick operations, enabling OS command injection in vulnerable apps. No public exploit identified at time of analysis; EPSS is low (0.22%, 44th percentile) and the issue is not in CISA KEV, reflecting that exploitation requires an insecure application coding pattern rather than affecting all Rails deployments.
Command injection in Ruby on Rails Active Storage allows remote attackers to execute arbitrary commands on the server when an application passes untrusted user input as image transformation methods or parameters. The flaw stems from three methods in Active Storage's default allowed-transformations list that can bypass the framework's safe defaults, but only impacts apps using the image_processing gem with the mini_magick processor. No public exploit has been identified at time of analysis and EPSS exploitation probability is low (0.22%), so risk is concentrated on applications that genuinely expose transformation parameters to user input.
Active Storage allowed transformation methods potentially unsafe
Active Storage attempts to prevent the use of potentially unsafe image transformation methods and parameters by default.
RemediationAI
Patch available per vendor advisory: upgrade Rails to the fixed release indicated in GHSA-r4mg-4433-c7g3 (https://github.com/advisories/GHSA-r4mg-4433-c7g3), citing the exact patched version for your Rails series before deploying. Until you can upgrade, stop consuming user-supplied input for image transformation methods or their parameters entirely - this is unsupported behavior, so the most effective control is to never bind request params into blob.variant(...) and instead map user choices to a fixed server-side dictionary of vetted transformations (trade-off: a code change that removes dynamic transformation flexibility). Additionally, enforce strict allow-list validation of any method names and argument values, and deploy a hardened ImageMagick security policy (policy.xml per https://imagemagick.org/script/security-policy.php) to disable risky coders/delegates and constrain resources (trade-off: an overly strict policy can break legitimate image formats/operations, so test against your real workload first).
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in rubygems
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
Active Storage is the Ruby on Rails subsystem for file/attachment handling; image variants are produced through the image_processing gem backed by an image processor - here MiniMagick, which shells out to ImageMagick. To reduce risk, Active Storage maintains an allow-list of transformation methods and parameters considered safe. The root cause (CWE-77, Command Injection) is that the default allow-list includes three methods that let a caller circumvent those safe defaults and pass attacker-controlled values into ImageMagick command construction. The vulnerable pattern is application code that binds request parameters directly into a variant, e.g. blob.variant(params[:t] => params[:v]), so untrusted method names/arguments flow into the MiniMagick/ImageMagick invocation.
Know when PHP 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
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
Network-reachable RCE (C/I/A:H), but AC:H because exploitation depends on the non-default condition that the app forwards untrusted input into transformation methods; no attacker auth (PR:N).
AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
Primary rating from Vendor (hackerone).
CVSS VectorVendor: hackerone
Lifecycle Timeline
7DescriptionCVE.org
Active Storage allowed transformation methods potentially unsafe
Active Storage attempts to prevent the use of potentially unsafe image transformation methods and parameters by default.
The default allowed list contains three methods allow for the circumvention of the safe defaults which enables potential command injection vulnerabilities in cases where arbitrary user supplied input is accepted as valid transformation methods or parameters.
Impact ------ This vulnerability impacts applications that use Active Storage with the image_processing processing gem in addition to mini_magick as the image processor.
Vulnerable code will look something similar to this:
<%= image_tag blob.variant(params[:t] => params[:v]) %>Where the transformation method or its arguments are untrusted arbitrary input.
All users running an affected release should either upgrade or use one of the workarounds immediately.
Workarounds ----------- Consuming user supplied input for image transformation methods or their parameters is unsupported behavior and should be considered dangerous.
Strict validation of user supplied methods and parameters should be performed as well as having a strong ImageMagick security policy deployed.
Credits -------
Thank you lio346 for reporting this!
Executive ViewAI
Ruby on Rails Active Storage contains a critical remote code execution vulnerability (CVE-2025-24293) affecting applications that process user-supplied image transformations. Successful exploitation enables attackers to execute arbitrary commands on affected servers, potentially compromising sensitive data, infrastructure, and business operations. A vendor patch is available and should be deployed immediately to all affected systems.
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
OS command injection occurs when an application passes unsanitized user input directly into system shell commands.
In PHP versions 7.1.x below 7.1.33, 7.2.x below 7.2.24 and 7.3.x below 7.3.11 in certain configurations of FPM setup it
sapi/cgi/cgi_main.c in PHP before 5.3.12 and 5.4.x before 5.4.2, when configured as a CGI script (aka php-cgi), does not
(1) boardData102.php, (2) boardData103.php, (3) boardDataJP.php, (4) boardDataNA.php, and (5) boardDataWW.php in Netgear
The '/common/download_agent_installer.php' script in the Quest KACE System Management Appliance 8.0.318 is accessible by
ProjectSend versions prior to r1720 are affected by an improper authentication vulnerability. Rated critical severity (C
Roundcube Webmail contains a critical PHP object deserialization vulnerability (CVE-2025-49113, CVSS 9.9) that allows au
Util/PHP/eval-stdin.php in PHPUnit before 4.8.28 and 5.x before 5.6.3 allows remote attackers to execute arbitrary PHP c
Palo Alto Networks PAN-OS management web interface contains an authentication bypass allowing unauthenticated attackers
Nagios XI version xi-5.7.5 is affected by OS command injection. Rated high severity (CVSS 8.8), this vulnerability is re
Nagios XI version xi-5.7.5 is affected by OS command injection. Rated high severity (CVSS 8.8), this vulnerability is re
The get_referers function in /opt/ws/bin/sblistpack in Sophos Web Appliance before 3.7.9.1 and 3.8 before 3.8.1.1 allows
The Backup Migration plugin for WordPress is vulnerable to Remote Code Execution in all versions up to, and including, 1
Same weakness CWE-77 – Command Injection
View allSame technique Command Injection
View allVendor StatusVendor
SUSE
Severity: Important| Product | Status |
|---|---|
| SUSE Linux Enterprise High Availability Extension 15 SP7 | Not-Affected |
| SUSE Linux Enterprise High Availability Extension 16.0 | Affected |
| SUSE Linux Enterprise Server for SAP applications 16.0 | Affected |
| openSUSE Leap 16.0 | Affected |
| SUSE Linux Enterprise High Availability Extension 12 SP5 | Not-Affected |
| SUSE Linux Enterprise High Availability Extension 15 SP4 | Not-Affected |
| SUSE Linux Enterprise High Availability Extension 15 SP5 | Not-Affected |
| SUSE Linux Enterprise Server for SAP Applications 12 SP5 | Not-Affected |
| SUSE Linux Enterprise High Availability Extension 12 SP4 | Not-Affected |
| SUSE Linux Enterprise High Availability Extension 15 | Not-Affected |
| SUSE Linux Enterprise High Availability Extension 15 SP1 | Not-Affected |
| SUSE Linux Enterprise High Availability Extension 15 SP2 | Not-Affected |
| SUSE Linux Enterprise High Availability Extension 15 SP3 | Not-Affected |
| SUSE Linux Enterprise High Availability Extension 15 SP6 | Not-Affected |
| openSUSE Leap 15.3 | Not-Affected |
| openSUSE Leap 15.4 | Not-Affected |
| openSUSE Leap 15.5 | Not-Affected |
| openSUSE Leap 15.6 | Not-Affected |
GHSA-r4mg-4433-c7g3
NVD
CVE.org
EPSS
VulDB
Exploit-DB