Exploited now
Vulnerability WatchVulnerabilities, exploits & advisories — updated every 15 minutes
Alerts

Home › CVE › Ruby

CVE-2026-122006 — Active Storage: Possible arbitrary file write and read in image analysis

Critical · CVSS 9.8EPSS 0.7% First seen November 12, 2026
RubyLinuxWebOperating systemsAIDatabases

Research article

CVE-2026-122006: Active Storage Vulnerability in Ruby on Rails

CVECVE-2026-122006
Vendor and productrubygems:activestorage
PublishedNovember 19, 2026 08:15 UTC
Research cut-offNovember 19, 2026 08:01 UTC
Sources reviewed4: NVD record (last modified 2026-11-12); CISA KEV catalog; GitHub advisory (2026-11-12); FIRST EPSS (2026-11-18)

Executive summary

CVE-2026-122006 affects Ruby on Rails' Active Storage component, with a CVSS 3.1 score of 9.8 CRITICAL, scored by cve@mitre.org [1]. The vulnerability impacts versions of Active Storage below 8.0.5.2 and between 8.1 and 8.1.4.1. The reviewed sources do not report exploitation [2]. The main action is to update to a fixed version of Active Storage [1].

Key points

  • CVE-2026-122006 affects Ruby on Rails' Active Storage component [1].
  • The CVSS 3.1 score is 9.8 CRITICAL, scored by cve@mitre.org [1].
  • Versions below 8.0.5.2 and between 8.1 and 8.1.4.1 are affected [1].
  • The reviewed sources do not report exploitation [2].
  • Remediation requires updating to a fixed version of Active Storage and applying the new security policy [3].

Vulnerability identification

CVE IDVendorProductCWECVSS 3.1PublishedLast ModifiedRecord Status
CVE-2026-122006Ruby on RailsActive StorageCWE-11889.8 CRITICAL, scored by cve@mitre.org [1]2026-11-04T15:17:422026-11-12T22:09:39Awaiting Analysis

Vulnerability description

A Rails application that uses ImageMagick for Active Storage image processing is at risk of unauthenticated file writing and reading attacks if it accepts untrusted file uploads [3]. The flaw stems from ImageMagick's ability to process filenames within images, which Active Storage does not restrict [3]. An attacker could exploit this by uploading a specially crafted file, which would trigger ImageMagick to run arbitrary code without requiring additional steps like previews or analysis [3].

Attack surface and exploitation prerequisites

The CVSS vector indicates the vulnerability has network access (AV:N), requires no privileges (PR:N), needs no user interaction (UI:N), and has high impact on confidentiality, integrity, and availability (C:H, I:H, A:H) [1].

Impact analysis

The CVSS vector highlights a high impact on confidentiality, integrity, and availability (C:H, I:H, A:H) [1]. The flaw allows attackers to access files that the application process can read, including secrets and credentials for external systems [3].

Affected products and versions

Affected VersionFixed Version
< 8.0.5.28.0.5.2 [1]
≥ 8.1, < 8.1.4.18.1.4.1 [1]

Exploitation and threat intelligence status

CVE-2026-122006 is not listed in the CISA Known Exploited Vulnerabilities Catalog as of 2026-11-19 [2]. The EPSS score for this CVE is 0.74%, suggesting a low likelihood of exploitation in the next 30 days [4].

Detection and exposure assessment

Users can assess their exposure by verifying whether their installed version of Active Storage falls within the affected range [1].

Remediation

Applications configured to use config.active_storage.variant_processor = :mini_magick must upgrade activestorage to a fixed version: 8.0.5.2 for the affected 8.0 line or 8.1.4.1 for the affected 8.1 line [3]. Older versions of activestorage below 8.0.5.2 or 8.1.4.1 are vulnerable [3]. The solution involves updating to a fixed version of activestorage and applying the new security policy [3].

Remediation checklist

  1. Upgrade Active Storage to the fixed version for your branch: 8.0.5.2 for the 8.0 line and 8.1.4.1 for the 8.1 line [1].
  2. Apply the new security policy to ImageMagick's system policy file, such as `/etc/ImageMagick-7/policy.xml` [3].
  3. Applications that replace `MiniMagick.cli_env` or use `MiniMagick.cli_prefix` must apply the security policy rules manually [3].
  4. Change all secrets readable by the application process, including credentials and encryption keys, if using the Disk service [3].

Evidence gaps

  • The sources do not describe the affected component's internals.
  • The sources do not mention a workaround.
  • The sources do not describe the attack lifecycle in detail.
  • The sources do not provide indicators of compromise.
  • The sources do not list a fixed version for all affected products.

References

  1. CVE-2026-122006 record. NIST National Vulnerability Database (NVD), 2026-11-12. https://nvd.nist.gov/vuln/detail/CVE-2026-122006. Accessed 2026-11-19. CVE record, CVSS scores, affected versions, and fixed versions.
  2. Known Exploited Vulnerabilities Catalog. Cybersecurity and Infrastructure Security Agency (CISA), 2026-11-19. https://www.cisa.gov/known-exploited-vulnerabilities-catalog. Accessed 2026-11-19. Exploitation status (not listed in CISA KEV).
  3. GHSA-f3w6-w445-fwh9 / CVE-2026-122006 — Active Storage: Possible arbitrary file write and read in image analysis. GitHub Security Advisory Database, 2026-11-12. https://github.com/advisories/GHSA-f3w6-w445-fwh9. Accessed 2026-11-19. Vulnerability description, attack mechanics, mitigation, and affected versions.
  4. EPSS score for CVE-2026-122006. FIRST, 2026-11-18. https://api.first.org/data/v1/epss?cve=CVE-2026-122006. Accessed 2026-11-19. EPSS score and its interpretation.

Written with AI assistance from the 4 sources listed above, as of the research cut-off; each fact is cited to its source. Check the vendor's advisory before acting.

Severity breakdown

Critical · 9.8 CVSS 3.1 base score from the CNA (mitre.org)

An attacker without an account can exploit this over the network, without any user action.

Attack from
the network (remotely)
Attack complexity
low (no special conditions)
Login needed
no
User action needed
no
Scope
stays within the vulnerable component
Impact
high on confidentiality, integrity and availability

Vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H · CVSS 3.0 9.8 from GitHub: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Weakness

  • CWE-1188: Initialization of a Resource with an Insecure Default

Affected and fixed versions

ProductAffected versionsFixed in
activestorage (RubyGems)≥ 8.1.0.beta1, < 8.1.4.18.1.4.1
< 8.0.5.28.0.5.2
rubyonrails Active Storage< 8.0.5.28.0.5.2
≥ 8.1, < 8.1.4.18.1.4.1

From the GitHub Advisory Database and the vendor's CVE record; confirm with the vendor advisory before relying on a version number.

References by type

Vendor advisories

Patches and fixed releases

Other references

Details from NVD (public domain), the GitHub Advisory Database (CC BY 4.0).

Details

Impact

A Rails application that processes attachments with ImageMagick may allow an unauthenticated attacker to write arbitrary files on the server and, when attachments are stored with the Disk service, to read arbitrary files readable by the application process. Those files typically include secret_key_base and credentials for external systems, which may in turn allow escalation to remote code execution or lateral movement to those systems.

Details

ImageMagick selects a coder from the content of the file it is given, and some coders act on files named inside the image rather than on the image itself. Active Storage constrained none of ImageMagick's coders, and the ImageMagick analyzer runs when a file is attached, so an attacker who can upload a crafted file may be able to invoke one. Attaching the upload is sufficient; no variant, preview, or analyze call is required. One specific attack chain has been reported to us, but we do not assume it is the only one that exists.

The fixed versions ship an ImageMagick security policy and prepend its directory to MAGICK_CONFIGURE_PATH through MiniMagick.cli_env, so every ImageMagick process that MiniMagick spawns applies it. The policy denies the MSL scripting coder, the coders that read or delete files other than the image, fetch remote or local references, or display to a screen, every coder backed by Ghostscript together with the gs delegate, and @filename indirection. ImageMagick applies every policy.xml on its search path, so the shipped policy adds to the host's policy rather than replacing it. The policy applies to every ImageMagick command that MiniMagick runs, not only those of Active Storage. See the activestorage CHANGELOG and "ImageMagick Security Policy" in the Active Storage guide.

Affected applications

An application is affected if it meets all of these requirements:

  • Uses ImageMagick for Active Storage image processing. This is config.active_storage.variant_processor = :mini_magick, which is the default for applications on load_defaults 6.1 or earlier.
  • Runs ImageMagick under a security policy that does not already deny the coders involved. The policies that Debian and Ubuntu package do not.
  • Allows file uploads from untrusted users.

Mitigation

  • Upgrade to a fixed version of activestorage.
  • An application whose variant processor is :mini_magick must use mini_magick >= 5.1, which applying the policy requires. With an older mini_magick, such an application raises an exception during boot.
  • An application that renders PostScript or PDF through ImageMagick must re-allow the gs delegate and the coders it uses in the host's policy.xml.
  • An application that replaces MiniMagick.cli_env after boot, clears the environment with MiniMagick.cli_prefix, or installs its own MiniMagick::Shell does not receive the shipped policy and must carry its rules in ImageMagick's system policy. GraphicsMagick does not read ImageMagick policies.
  • If attachments are stored with the Disk service, change secret_key_base and every secret readable by the application process, including the master key and everything config/credentials.yml.enc holds, storage and database credentials, and third-party tokens. Do not retain an exposed secret as a fallback.

Workarounds

Copy the rules of the policy that the fixed versions ship, activestorage/lib/active_storage/image_magick/policy.xml, into ImageMagick's system policy, for example /etc/ImageMagick-7/policy.xml. At a minimum, deny the MSL coder, the Ghostscript coders, and the gs delegate:

<policy domain="coder" rights="none" pattern="MSL"/>
<policy domain="delegate" rights="none" pattern="gs"/>
<policy domain="coder" rights="none" pattern="{PS,PS2,PS3,EPS,EPS2,EPS3,EPI,EPSF,EPSI,EPT,EPT2,EPT3,PDF,AI,EPDF,PDFA,POCKETMOD,XPS,PCL}"/>

Releases

The fixed releases are available at the normal locations.

Patches for those who cannot upgrade at once:

Versions affected

  • activestorage < 8.0.5.2
  • activestorage >= 8.1, < 8.1.4.1

Credit

This issue was responsibly reported by HackerOne researcher ryotak.

References

Source: GHSA-f3w6-w445-fwh9 / CVE-2026-122006, GitHub Advisory Database, licensed CC BY 4.0.

Affected

  • rubygems:activestorage

Frequently asked questions

What is CVE-2026-122006?

CVE-2026-122006 affects Ruby on Rails' Active Storage component, with a CVSS 3.1 score of 9.8 CRITICAL, scored by cve@mitre.org. The vulnerability impacts versions of Active Storage below 8.0.5.2 and between 8.1 and 8.1.4.1. The reviewed sources do not report exploitation. The main action is to update to a fixed version of Active Storage. Weakness type: Initialization of a Resource with an Insecure Default (CWE-1188).

How severe is CVE-2026-122006?

CVE-2026-122006 has a CVSS 3.1 base score of 9.8 (critical), from the CNA (mitre.org). An attacker without an account can exploit this over the network, without any user action.

Is CVE-2026-122006 being exploited?

Not as far as is known: CVE-2026-122006 is not in CISA's Known Exploited Vulnerabilities catalog as of November 26, 2026. EPSS estimates a 0.7% chance that it is exploited in the next 30 days.

Which versions are affected by CVE-2026-122006?

activestorage (RubyGems) ≥ 8.1.0.beta1, < 8.1.4.1 (fixed in 8.1.4.1); activestorage (RubyGems) < 8.0.5.2 (fixed in 8.0.5.2); rubyonrails Active Storage < 8.0.5.2 (fixed in 8.0.5.2); rubyonrails Active Storage ≥ 8.1, < 8.1.4.1 (fixed in 8.1.4.1).

How do I fix CVE-2026-122006?

Upgrade Active Storage to the fixed version for your branch: 8.0.5.2 for the 8.0 line and 8.1.4.1 for the 8.1 line. Apply the new security policy to ImageMagick's system policy file, such as /etc/ImageMagick-7/policy.xml. Applications that replace MiniMagick.clienv or use MiniMagick.cliprefix must apply the security policy rules manually.

Timeline & sources

References

Related vulnerabilities & news