REDHAT-BUG-2435565: 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!
Affected Software
Event History
Frequently Asked Questions
What is the severity of REDHAT-BUG-2435565?
The severity of REDHAT-BUG-2435565 is rated high with a score of 7.
How do I fix REDHAT-BUG-2435565?
To fix REDHAT-BUG-2435565, implement stricter controls and validations on the allowed active storage transformation methods.
What type of attack is associated with REDHAT-BUG-2435565?
REDHAT-BUG-2435565 is associated with command injection vulnerabilities.
What does REDHAT-BUG-2435565 affect?
REDHAT-BUG-2435565 affects Ruby on Rails Active Storage by allowing unsafe image transformation methods.
What are the potential risks of REDHAT-BUG-2435565?
The risks of REDHAT-BUG-2435565 include the possibility of security breaches through exploitation of unsafe transformations.