Active Storage Command Injection Vulnerability via Unsafe Image Transformations

Vulnerability

A command injection vulnerability has been identified in Active Storage versions 5.2.0 through 7.1.5.2, as well as in version 8.0 prior to 8.0.2.1. This vulnerability arises when Active Storage is used with the image_processing gem and mini_magick as the image processor. The issue allows for the circumvention of default safety measures regarding image transformation methods and parameters. Vulnerable applications may inadvertently accept arbitrary user-supplied input as valid transformation methods or parameters, creating an opportunity for command injection.

Impact

Exploitation of this vulnerability could lead to command injection, allowing an attacker to execute arbitrary commands on the server where the application is running.

Remediation

Users can upgrade to Active Storage versions 8.0.2.1, 7.2.2.2, or 7.1.5.2 to address this vulnerability. For those unable to upgrade immediately, it is recommended to perform strict validation of user-supplied input for image transformation methods and parameters, as this is considered dangerous. Additionally, deploying a strong ImageMagick security policy is advised.

Added: Jan 30, 2026, 9:21 PM
Updated: Jan 30, 2026, 9:21 PM

Vulnerability Rating

Custom Algorithm
spread
0.0
impact
2.5
exploitability
6.2
remediation
0.0
relevance
2.5
threat
0.0
urgency
2.9
incentive
0.0

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.