# CVE-2026-122006: Ruby on Rails activestorage ImageMagick arbitrary file read/write

Source: https://junglewise.ai/threats/cve-2026-122006-the-activestorage-gem-before-8-1-4-1-for-ruby-on-rails-when  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-11-04. Updated: 2026-11-04  
License: CC BY 4.0 with a link back

CVE-2026-122006 · Severity: critical · CVSS 9.8 · Published 2026-11-04

Ruby on Rails' activestorage gem, which handles file attachments in Rails applications, fails to restrict ImageMagick operations when processing uploaded images. This allows attackers to read or write arbitrary files on the server, including sensitive secrets used to encrypt session data, by uploading a crafted image file.

Technologies: [activestorage (RubyGems)](https://junglewise.ai/threats/technologies/activestorage). Vendors: [Ruby on Rails](https://junglewise.ai/threats/vendors/ruby-on-rails), [RubyGems](https://junglewise.ai/threats/vendors/rubygems).

## Quick answers

**Is CVE-2026-122006 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-122006 being exploited in the wild.

**How severe is CVE-2026-122006?** Critical severity, with a CVSS score of 9.8, published 4 November 2026.

**Which products and versions are affected?** Ruby on Rails Activestorage before 8.1.4.1; activestorage (RubyGems) >= 8.1.0.beta1, < 8.1.4.1.

**Is there a fix for CVE-2026-122006?** Yes: fixed in activestorage 8.1.4.1, Rails 8.0.5.2. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-122006 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-122006?** Check whether you run Ruby on Rails Activestorage or activestorage (RubyGems) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- Fixed in activestorage 8.1.4.1, Rails 8.0.5.2

## Technical details

The activestorage gem automatically analyzes attached images using ImageMagick without enforcing a security policy to restrict dangerous operations. An attacker can upload a malicious image file that triggers ImageMagick to read or write arbitrary files during the analysis phase. The vulnerability requires file upload capability and no authentication bypass; it directly impacts server confidentiality and integrity.

## Affected products

- Ruby on Rails activestorage before 8.1.4.1

## Identifiers

- CVE-2026-122006
- GHSA-f3w6-w445-fwh9

## Timeline

- 2026-11-04: disclosed
- 2026-11-04: patched

## References

- [https://github.com/rails/rails/releases/tag/v8.0.5.2](https://github.com/rails/rails/releases/tag/v8.0.5.2)
- [https://github.com/rails/rails/releases/tag/v8.1.4.1](https://github.com/rails/rails/releases/tag/v8.1.4.1)

## Related threats

- [Active Storage: Possible local file disclosure in video previews and analysis](https://junglewise.ai/threats/cve-2026-126188-active-storage-makes-it-simple-to-upload-and-reference-files-in)
- [Ruby on Rails Active Storage arbitrary file read and RCE in media processing](https://junglewise.ai/threats/cve-2026-126186-active-storage-possible-arbitrary-file-read-and-remote-code)
- [Ruby on Rails Active Storage content length bypass in Google Cloud Storage uploads](https://junglewise.ai/threats/cve-2026-126085-active-storage-possible-circumvention-of-file-size-limits-in)
- [Ruby on Rails Active Storage GCS signature bypass](https://junglewise.ai/threats/cve-2026-126084-active-storage-makes-it-simple-to-upload-and-reference-files-in)
- [Rails Active Storage persistent DoS via NUL byte filename](https://junglewise.ai/threats/cve-2026-126074-active-storage-makes-it-simple-to-upload-and-reference-files-in)
