A critical vulnerability in Ruby on Rails could enable an unauthenticated attacker to upload arbitrary files to an app’s server by uploading a malicious file to an application which uses ImageMagick to process uploads. The vulnerability was disclosed in a security advisory by the Rails project and patched in versions 8.1.4.1 and 8.0.5.2.
The vulnerability exists in the Active Storage component of Rails. Those applications which use Active Storage’s Disk service to store uploaded files will also be vulnerable to an attacker being able to read any files they can read.
This typically includes the app’s secret_key_base and credentials for other systems. This could lead to remote code execution or lateral movement into these systems, Rails said.
The vulnerability is rated at 9.8/10 on the CVSS scale. It has issue ID GHSA-f3w6-w445-fwh9 but no existing CVE.
ImageMagick uses the contents of a file to determine which format handler (or coder) to use. Some coders will operate on additional files that are referenced within the image read more about Critical Rails Flaw Lets Attackers Write Server Files via Crafted ImageMagick Uploads
Get up to date on the latest cybersecurity news and enhance your knowledge of cybersecurity with our thorough coverage of the dangers, breaches, and solutions.
