A critical 9.8-rated vulnerability in Ruby on Rails (GHSA-f3w6-w445-fwh9) allows unauthenticated attackers to write arbitrary files via ImageMagick file uploads.
Applications utilizing Active Storage Disk service may also expose sensitive credentials, risking remote code execution.
Rails has shipped fixes in versions 8.1.4.1 and 8.0.5.2.
How did the problem work?
The issue concerns the way files uploaded by users are handled in an application. Specifically, if a website uses the ImageMagick image editor and accepts files from strangers, an attacker could upload a specially crafted image and force the system to write or read files that should not normally be accessible.
If the app stores uploaded files locally on the hard drive, the risk is greater.…