Command Injection Vulnerability in Active Storage by Rails
CVE-2025-24293
What is CVE-2025-24293?
The Active Storage feature of Rails has a vulnerability that allows unsafe image transformation methods, which can lead to command injection attacks. This occurs when an application accepts arbitrary and untrusted user input as valid transformation methods or parameters. Such vulnerabilities are particularly impactful when used in conjunction with the image_processing gem and mini_magick as an image processor. Developers must exercise strict validation of inputs and should not rely on default methods that could be exploited. To safeguard against this vulnerability, it is recommended to upgrade to the latest version or implement strong validation policies for user inputs alongside a robust ImageMagick security policy.
Affected Version(s)
activestorage 5.2 < 5.*
activestorage 7.0 < 7.1.5.2
activestorage 8.0 < 7.0.2.1
