CVE-2025-24293: Command Injection
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 imageprocessing processing gem in addition to minimagick as the image processor.
Vulnerable code will look something similar to this: <%= imagetag 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!
Other sources
Active Storage attempts to prevent the use of potentially unsafe image transformation methods and parameters by default.
The default allowed list contains three methods allowing 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.
This has been assigned the CVE identifier CVE-2025-24293.
Versions Affected: >= 5.2.0 Not affected: < 5.2.0 Fixed Versions: 7.1.5.2, 7.2.2.2, 8.0.2.1
Impact ------ This vulnerability impacts applications that use Active Storage with the imageprocessing processing gem in addition to minimagick as the image processor.
Vulnerable code will look something similar to this:
<%= imagetag 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.
Releases -------- The fixed releases are available at the normal locations.
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 from Unit 515 of OPSWAT for reporting this!
— GitHub
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
rubygems/activestorageto a version that resolves this vulnerability.Fixed in 7.1.5.2 - Upgrade
Upgrade
rubygems/activestorageto a version that resolves this vulnerability.Fixed in 7.2.2.2 - Upgrade
Upgrade
rubygems/activestorageto a version that resolves this vulnerability.Fixed in 8.0.2.1 - Upgrade
Upgrade
debian/railsto a version that resolves this vulnerability.Fixed in 2:6.0.3.7+dfsg-2+deb11u4Fixed in 2:6.1.7.10+dfsg-1~deb12u2Fixed in 2:7.2.2.2+dfsg-2~deb13u1Fixed in 2:7.2.2.2+dfsg-1 - Upgrade
Upgrade
debian/railsto a version that resolves this vulnerability.Fixed in 2:6.1.7.10+dfsg-1~deb12u2 - Upgrade
Upgrade
debian/railsto a version that resolves this vulnerability.Fixed in 2:7.2.2.2+dfsg-2~deb13u1 - Upgrade
Upgrade
debian/railsto a version that resolves this vulnerability.Fixed in 2:7.2.2.2+dfsg-1 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 7.1.5.2 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 7.2.2.2 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 8.0.2.1 - Compensating control
Strictly validate user-supplied image transformation methods and their parameters.
- Compensating control
Deploy a strong ImageMagick security policy.
Event History
Frequently Asked Questions
What is the severity of CVE-2025-24293?
CVE-2025-24293 is classified as a high severity vulnerability due to its potential for command injection.
What versions of Active Storage are affected by CVE-2025-24293?
CVE-2025-24293 affects Active Storage versions prior to 7.1.5.2, 7.2.2.2, and 8.0.2.1.
How do I fix CVE-2025-24293?
To fix CVE-2025-24293, upgrade Active Storage to versions 7.1.5.2, 7.2.2.2, or 8.0.2.1 or later.
What specific issues does CVE-2025-24293 address?
CVE-2025-24293 addresses vulnerabilities related to unsafe image transformation methods that could lead to command injection.
Is there a workaround for CVE-2025-24293 if I can't upgrade immediately?
There are no known effective workarounds for CVE-2025-24293, so upgrading to the fixed versions is strongly recommended.