CVE-2025-24293 Active Storage allowed transformation methods that were potentially unsafe

Critical 9.2 Published Updated

Attackers can execute arbitrary commands via unsafe image transformation parameters in Rails Active Storage when using mini_magick.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2025-24293?

CVE-2025-24293 is a critical command injection vulnerability in Rails activestorage, published on 30 Jan 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

# 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](https://imagemagick.org/script/security-policy.php) deployed. Credits ------- Thank you [lio346](https://hackerone.com/lio346) for reporting this!

Weakness: CWE-88, CWE-94, CWE-77

Which versions are affected by CVE-2025-24293?

6 open source packages ship an affected version, including activestorage.

PackageAffectedFixed in
activestorage RubyGemsFrom 5.2.07.1.5.2
activestorage RubyGemsFrom 5.2.07.1.5.2
activestorage RubyGemsFrom 7.27.2.2.2
activestorage RubyGemsFrom 7.27.2.2.2
activestorage RubyGemsFrom 8.08.0.2.1
activestorage RubyGemsFrom 8.08.0.2.1

How do I fix CVE-2025-24293?

Upgrade activestorage to a fixed version for your release line: 7.1.5.2, 7.2.2.2 or 8.0.2.1.

Upgrade, and pass arguments to programs as a list instead of through a shell. More about Command injection.

Is CVE-2025-24293 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-24293 exists.

Public exploit code: 1 Metasploit module and 1 proofs of concept on GitHub.

Sources

Also known as DEBIAN-CVE-2025-24293, GHSA-r4mg-4433-c7g3, UBUNTU-CVE-2025-24293.

Is CVE-2025-24293 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free