Check out the latest research from IONIX: NEW! State of the WAF Report

New CVE Detected

CVE-2026-122006 – Arbitrary File Read/Write via ImageMagick in Active Storage – Ruby on Rails active

Be the first to know when new zero-days emerge:

Summary

CVE-2026-122006 is a critical arbitrary file write and read vulnerability in the Active Storage component (activestorage gem) of Ruby on Rails. When an application processes uploads with ImageMagick, a crafted file can make the server read and write files, for example to read secret_key_base. The CVSS base score is 9.8 (Critical).

Technical details

  • Root cause: ImageMagick selects coders based on file content, and some coders operate on files referenced by the input rather than on image data. Active Storage placed no restrictions on these coders. No ImageMagick security policy blocked this by default (CWE-1188, Initialization of a Resource with an Insecure Default).
  • Trigger conditions: the application uses ImageMagick for processing (the default for load_defaults 6.1 or earlier), runs under an unrestrictive ImageMagick security policy, and accepts untrusted file uploads.
  • Attack vector: a remote, unauthenticated attacker uploads a crafted file. The ImageMagick analyzer runs automatically when the file is attached, so no further action is needed. The advisory names the MSL scripting coder and coders that handle file operations outside images.
  • Impact: arbitrary file write on the server. With the Disk storage service, the attacker can also read sensitive files such as credentials and encryption keys. The advisory states this can enable remote code execution or lateral movement.

Affected software

  • activestorage (Ruby on Rails) earlier than 8.0.5.2
  • activestorage 8.1.0 up to, but not including, 8.1.4.1

Severity

CVSS v3.1 base score 9.8 (Critical): CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Mitigation and recommended actions

  • Immediate: upgrade to Rails/activestorage 8.0.5.2 or 8.1.4.1. If you use :mini_magick, require mini_magick 5.1 or later.
  • After patching, reset secret_key_base, the master key, credentials and all third-party tokens, because they may have been exposed.
  • Workaround: apply the policy.xml rules shipped with the fix to the system ImageMagick configuration. These rules deny the MSL coder and Ghostscript-related processors.
  • Limit untrusted file uploads where possible.

References

Get a free Attack Surface scan to see if you’re exposed.

Get a free Attack Surface scan to see if you’re exposed.

How IONIX’s External Exposure Management Platform Detects and Validates
Zero-Days to Shrink MTTR

1

Map your entire attack surface (continously)

IONIX uses multi-factor discovery methods, including DNS analysis, certificate mapping, metadata inspection, and more, to automatically map every internet-facing asset across your environment. This includes cloud instances, third-party platforms, shadow IT, and even forgotten infrastructure that traditional tools miss.

2

Monitor for new CVEs

Dozens of threat intel feeds using agentic technology are continuously analyzed to detect the appearance of proof-of-concept code, exploit kits, and indicators of active targeting. IONIX goes further by applying AI to proactively evaluate whether emerging vulnerabilities are likely to be exploited, even before PoCs go public.

3

Identify Potential External Exposures

Not all CVEs matter. IONIX filters vulnerabilities by asking attacker-centric questions: Can it be reached from the internet? Does it require authentication? Is it being exploited in the wild? This dramatically reduces noise and focuses teams on threats that can actually be weaponized.

4

Create Safe, Scalable Exploit Validations

IONIX transforms real-world PoCs into safe, non-intrusive test payloads that can be run in production environments without disruption. These simulations are precisely targeted to the systems that are vulnerable, ensuring rapid validation without unnecessary load.

5

Execute Exploit Validations

By combining context about software stack, versioning, exposure status, and reachability, IONIX ensures that only the right payloads are executed against the right assets, maximizing efficiency and minimizing risk.

6

Drive Fast and Actionable Remediation

Results are routed through integrations with ticketing, SOAR, and SIEM tools. Issues are written in plain language, bundled into remediation clusters, and prioritized based on asset criticality, exploitability, and blast radius. This shortens mean time to remediation (MTTR) and empowers teams to act with confidence.

Are you exposed?

Get a free report of your organization’s exposure to this CVE and threat

Subscribe to Threat Center RSS

Copy/paste the link below into your preferred RSS reader or follow these instructions to subscribe to Slack alerts.

Get Real-Time CVE Alerts to Your Email

Be the first to know when new zero-days emerge