
Rails 8.1.4.1 and 8.0.5.2 Patch Critical ImageMagick File Write Flaw
Ruby on Rails has released versions 8.1.4.1 and 8.0.5.2 to fix a critical vulnerability in Active Storage that allows unauthenticated attackers to write arbitrary files on servers. The flaw, rated 9.8 on the CVSS scale, is triggered when apps use ImageMagick for image processing and accept uploads from untrusted users. It is tracked as GHSA-f3w6-w445-fwh9 and lacks a CVE identifier. The issue stems from Active Storage’s analyzer running on file attachment, which can invoke ImageMagick’s MSL coder to read or write files. Apps using the Disk service are also at risk of having their secret_key_base and other credentials read, potentially leading to remote code execution. The fix includes a new ImageMagick security policy that blocks dangerous coders. Rails strongly recommends immediate upgrades, noting that the releases also address a second high-severity flaw involving FFmpeg and temporary file names.