← All stories
● Covered by 1 source · 1 reportMedium impact1 neutral

Critical Ruby on Rails Flaw Allows Arbitrary File Write via Crafted ImageMagick Uploads

🔄 Updated 2d ago
New to BrevFeed? We gather this story from every outlet covering it into one summary — ranked by real-world impact, not just the latest headline — so you never miss what matters. What is BrevFeed? →

Key points

  • Rails Active Storage flaw allows arbitrary file write via crafted uploads.
  • Affects apps using ImageMagick for image processing and Disk service.
  • Vulnerability rated 9.8 CVSS, fixed in Rails 8.1.4.1 and 8.0.5.2.
  • Exploitation can expose secret keys, leading to RCE or lateral movement.

Critical Vulnerability in Active Storage

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.

Potential for Data Exposure and RCE

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.

Technical Details of the Flaw

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.

Affected Applications and Remediation

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 →

The daily brief

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.

Today's brief

Spend a few minutes, get the whole day. Every topic's top stories in one hands-free rundown — listen, watch, or read the transcript.

~4 min · 3 stories · Nov 07

▶ Play today's brief Listen on Spotify

New every morning, and the back catalogue is archived by date.

Reporting from

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.