Ruby on Rails has disclosed a critical flaw in its Active Storage component, which handles file uploads. This vulnerability, tracked as GHSA-f3w6-w445-fwh9, allows an unauthenticated attacker to write arbitrary files to an application's server. The flaw is present if the application processes uploads using ImageMagick and stores files via Active Storage's Disk service.
In affected applications, an attacker could also read any file the application has access to. This typically includes sensitive data such as the app's secret_key_base and credentials for other systems. Accessing these files could enable remote code execution (RCE) or lateral movement into other connected systems. The Rails project rates this flaw with a CVSS score of 9.8 out of 10.
The vulnerability stems from ImageMagick's ability to select format handlers (coders) based on file content. Some coders can act on other files referenced within the image, not just the image itself. Active Storage previously imposed no restrictions on which coders an upload could use. The ImageMagick analyzer in Active Storage runs when a file is attached, making attachment alone sufficient to trigger the flaw. An uploaded SVG file could reach ImageMagick's MSL coder, a scripting coder capable of reading and writing files specified in its script.
An application is vulnerable if it uses ImageMagick for Active Storage image processing (config.active_storage.variant_processor = :mini_magick), its ImageMagick security policy does not block the involved coders (default policies in Debian and Ubuntu do not), and it accepts file uploads from untrusted users. The flaw has been fixed in Rails versions 8.1.4.1 and 8.0.5.2. Users are advised to update their Rails installations to these patched versions.
✨ This summary was generated by AI from the outlets' reporting listed below. It is not independently verified and may contain errors — check the original sources. How BrevFeed works →
One email each morning: the day's tech stories, clustered across outlets and summarized. No account needed.
One email a day. Unsubscribe in one click, any time.
Spend a few minutes, get the whole day. Every topic's top stories in one hands-free rundown — listen, watch, or read the transcript.
▶ Play today's briefNew every morning, and the back catalogue is archived by date.
A critical vulnerability in Ruby on Rails' Active Storage component allows unauthenticated attackers to write arbitrary files to a server by uploading a crafted file. This flaw, rated 9.8 on the CVSS scale, affects applications that use ImageMagick for image processing and could lead to remote code execution or lateral movement by exposing sensitive application credentials.