critical

CVE

CVE-2026-122006, CVE-2026-126082, CVE-2026-126186, CVE-2026-126080, CVE-2026-126081, CVE-2026-126083, CVE-2026-126085, CVE-2026-126074, CVE-2026-126076, CVE-2026-126071, CVE-2026-126073, CVE-2026-126075, CVE-2026-126067, CVE-2026-126068, CVE-2026-126062, CVE-2026-126063, CVE-2026-126064

CWE

CWE-1188, CWE-646, CWE-915, CWE-74, CWE-348, CWE-79, CWE-611, CWE-416

Affected Surface

  • Ruby on Rails (`rails`, `activestorage`, `actionpack`, `activesupport`, `actionview`, `actionmailbox`) versions `< 8.0.5.2` and `>= 8.1.0, < 8.1.4.1` (fixed in `8.0.5.2` and `8.1.4.1`; note that security support for the `8.0` series ended on 7 November 2026)
  • Rails applications using Active Storage with `:mini_magick` (`CVE-2026-122006` / `CVE-2026-126082` / `GHSA-f3w6-w445-fwh9`, requires `mini_magick >= 5.1` after upgrading) or FFmpeg/ImageMagick analyzers and previewers (`CVE-2026-126186` / `GHSA-v924-7rp8-4mxh`), `Parameters#each_key` (`CVE-2026-126081` / `GHSA-wm3x-v3qw-4jh3`), Action Cable `/cable` WebSocket endpoints (`CVE-2026-126080` / `GHSA-8474-xrp6-wh69`), or Rack 3 reverse proxies (`CVE-2026-126083` / `GHSA-2gff-2mmg-m73p`)
  • RubyGems `nokogiri` versions `< 1.19.5` (`CVE-2026-126062` / `GHSA-v995-44v6-5fqm` JRuby `NONET` short-form IPv4 external DTD bypass, `CVE-2026-126063` / `GHSA-4p39-36wj-23h4` HTML5 `<noscript>` mutation XSS, and `CVE-2026-126064` / `GHSA-3w22-6jfg-527w` attribute replacement use-after-free, fixed in `1.19.5`)

Update, 11 November 2026 (13 NVD CVE assignments for Rails 8.1.4.1 / 8.0.5.2 and Nokogiri 1.19.5 advisories): Between 20:47 and 22:18 UTC on 10 November 2026, NVD and the GitHub Advisory Database published 13 official CVE identifiers for the Rails 8.1.4.1 and 8.0.5.2 advisories alongside three advisories for Nokogiri 1.19.5:

  • Rails 8.1.4.1 / 8.0.5.2 CVE mappings: CVE-2026-126082 (CVSS 9.8 Critical, NVD’s second CVE mapping alongside CVE-2026-122006 for GHSA-f3w6-w445-fwh9 Active Storage ImageMagick RCE/file write), CVE-2026-126186 (CVSS 8.8 High for GHSA-v924-7rp8-4mxh ActiveStorage::Blob#open tempfile extension RCE/file read), CVE-2026-126081 (CVSS 7.5 High for GHSA-wm3x-v3qw-4jh3 ActionController::Parameters#each_key Strong Parameters bypass), CVE-2026-126080 (CVSS 7.5 High for GHSA-8474-xrp6-wh69 ActiveSupport::Inflector#safe_constantize DoS), CVE-2026-126083 (CVSS 7.4 High for GHSA-2gff-2mmg-m73p ActionDispatch::RemoteIp spoofing), CVE-2026-126085 (GHSA-hfr4-8rjc-97m2 GCS direct-upload size-limit bypass), CVE-2026-126074 (GHSA-p2pm-g2h6-7j5j Active Storage filename DoS), CVE-2026-126071 (GHSA-4v2w-w6g6-f8f8 Active Storage proxy streaming DoS), CVE-2026-126076 (GHSA-2586-8ghr-69fj CacheStore destroyed-session restoration), CVE-2026-126073 (GHSA-r9jg-fmfx-2gv6 Action Pack content-negotiation cache poisoning), CVE-2026-126075 (GHSA-2w9f-fxwj-w2qf Active Support MessagePack XSS), CVE-2026-126067 (GHSA-gmj8-hvj3-49mw missing SameSite attribute), and CVE-2026-126068 (GHSA-5957-c7qm-m469 Action Mailbox Mailgun signature replay).
  • Nokogiri 1.19.5 (CVE-2026-126062, CVE-2026-126063, and CVE-2026-126064): Fixes an HTML5 serializer mutation XSS (mXSS) through <noscript> content in >= 1.12.0, < 1.19.5 (CVE-2026-126063 / GHSA-4p39-36wj-23h4), a use-after-free when replacing an XML/HTML attribute value (CVE-2026-126064 / GHSA-3w22-6jfg-527w), and a JRuby NONET bypass where external DTDs and entities using short-form IPv4 hosts (http://2130706433/...) were fetched over the network (CVE-2026-126062 / GHSA-v995-44v6-5fqm).

Update, 6 November 2026: On 4 November 2026 (15:17 UTC), NVD assigned CVE-2026-122006 (CVSS v3.1 9.8 Critical, EPSS 0.74% / 54.9th percentile) to GHSA-f3w6-w445-fwh9 (the Active Storage :mini_magick ImageMagick MSL arbitrary file write and read flaw), and RubySec added CVE-2026-122006 to ruby-advisory-db (PR #1300). On 6 November, Socket also published backport guidance for older Rails 7.x and 8.0 branches ahead of the 7 November 2026 end-of-life cutoff for the Rails 8.0 series. We have added CVE-2026-122006 to the frontmatter and advisory table below.

TL;DR

Late on 3 November 2026 (oss-security 2026/11/04/2), the Ruby on Rails core team shipped Rails 8.1.4.1 and 8.0.5.2 to address 21 security advisories across activestorage, actionpack, activesupport, actionview, and actionmailbox. The release announcement also notes that 8.0.5.2 is the final scheduled security release before Rails 8.0 reaches end-of-life on 7 November 2026.

Five of the 21 advisories are rated Critical or High:

  1. GHSA-f3w6-w445-fwh9 (CVSS 9.8 Critical, activestorage): Active Storage’s ImageAnalyzer::ImageMagick runs automatically as soon as an upload is attached, without any variant or preview call, and previously passed the file to ImageMagick without restricting any ImageMagick coders. Because Debian and Ubuntu’s packaged ImageMagick policies do not block the MSL (Magick Scripting Language) coder or file-reading coders (TEXT, EPHEMERAL, MPC, URL, @*), an unauthenticated attacker uploading a polyglot or SVG attachment can invoke MSL to write arbitrary files on the server and, when the Disk storage service is used, read arbitrary files such as config/master.key and secret_key_base.
  2. GHSA-v924-7rp8-4mxh (CVSS 8.8 High, activestorage): ActiveStorage::Blob#open created temporary files named ActiveStorage-#{id}-#{filename.extension_with_delimiter}, preserving the uploader’s raw file extension even when it contradicted the blob’s recorded MIME type. External tools invoked on attach (ffprobe, ffmpeg, ImageMagick) select demuxers and coders from that extension: uploading an AviSynth script named attack.avs with content_type: "video/mp4" causes ffprobe/ffmpeg (when built with --enable-avisynth, as in the static builds from ffmpeg.org) to execute the script, disclosing local files or loading an attacker-uploaded shared library for remote code execution.
  3. GHSA-wm3x-v3qw-4jh3 (CVSS 7.5 High, actionpack): An incomplete fix for CVE-2020-8164 left ActionController::Parameters#each_key delegated directly to @parameters (ActiveSupport::HashWithIndifferentAccess). Calling params.each_key { ... } returned the underlying raw hash instead of the Parameters instance, stripping Strong Parameters enforcement (permitted?) when passed to Active Record mass assignment.
  4. GHSA-8474-xrp6-wh69 (CVSS 7.5 High, activesupport / actioncable): When constant autoloading raised LoadError, ActiveSupport::Inflector#safe_constantize interpolated unescaped ::-split segments of the caller’s string into /Unable to autoload constant #{const_regexp(camel_cased_word)}/. Because Action Cable passes the channel parameter of every WebSocket subscribe command straight to safe_constantize before channel lookup, an unauthenticated client connecting to /cable can feed arbitrary regex syntax into Ruby’s Onigmo compiler and crash the server process.
  5. GHSA-2gff-2mmg-m73p (CVSS 7.4 High, actionpack 8.1.x): Rails 8.1.0 switched ActionDispatch::RemoteIp to Rack::Request#forwarded_for, which under Rack 3 prefers the RFC 7239 Forwarded header over X-Forwarded-For. Behind reverse proxies that set X-Forwarded-For without stripping Forwarded, any client could spoof request.remote_ip (bypassing rate_limit and IP allowlists) without triggering IpSpoofAttackError.

What to do now: Upgrade to Rails 8.1.4.1 or 8.0.5.2 immediately (bundle update rails). If your application uses config.active_storage.variant_processor = :mini_magick, you must also upgrade mini_magick to >= 5.1, or Rails 8.1.4.1 / 8.0.5.2 will raise an exception at boot (ActiveStorage::MINIMAGICK_UNSECURABLE). If your app accepted untrusted uploads with :mini_magick + Disk storage or an AviSynth-enabled FFmpeg build, rotate secret_key_base, config/master.key, and all credentials in config/credentials.yml.enc.

Affected gems and advisories

GemAdvisory IDSeverityAffected versionsFixed versionsSummary
activestorageCVE-2026-122006 (GHSA-f3w6-w445-fwh9)Critical (9.8)< 8.0.5.2, >= 8.1.0, < 8.1.4.18.0.5.2, 8.1.4.1Arbitrary file write and read via unrestricted ImageMagick coders (MSL, TEXT, EPHEMERAL, gs) during image analysis
activestorageGHSA-v924-7rp8-4mxhHigh (8.8)< 8.0.5.2, >= 8.1.0, < 8.1.4.18.0.5.2, 8.1.4.1Arbitrary file read and RCE via attacker-controlled tempfile extension in ActiveStorage::Blob#open (ffprobe / ffmpeg .avs / ImageMagick)
actionpackGHSA-wm3x-v3qw-4jh3High (7.5)< 8.0.5.2, >= 8.1.0, < 8.1.4.18.0.5.2, 8.1.4.1Strong Parameters mass-assignment bypass when passing the return value of Parameters#each_key { ... } to a model
activesupportGHSA-8474-xrp6-wh69High (7.5)< 8.0.5.2, >= 8.1.0, < 8.1.4.18.0.5.2, 8.1.4.1Unescaped Regexp compilation in safe_constantize LoadError rescue block (reachable unauthenticated via Action Cable /cable subscribe)
actionpackGHSA-2gff-2mmg-m73pHigh (7.4)>= 8.1.0, < 8.1.4.18.1.4.1Client IP spoofing in ActionDispatch::RemoteIp when proxy sets X-Forwarded-For and passes Forwarded through under Rack 3
activestorageGHSA-x6mj-8jx9-qhqv, GHSA-4v2w-w6g6-f8f8, GHSA-p2pm-g2h6-7j5j, GHSA-3w93-6hmw-whh4, GHSA-hfr4-8rjc-97m2, GHSA-3f4q-8x5m-76v8Medium / Low (3.7 to 6.8)< 8.0.5.2, >= 8.1.0, < 8.1.4.18.0.5.2, 8.1.4.1Proxy-mode session leak and streaming DoS, filename DoS, GCS direct-upload Content-Type / size-limit bypass, and video preview local file disclosure
actionview / activesupportGHSA-2p2f-4rq4-gjwc, GHSA-v6rj-xm57-3p59, GHSA-rq8q-p985-fjq7, GHSA-68p9-83h6-5wpj, GHSA-2w9f-fxwj-w2qfMedium (4.7 to 6.1)< 8.0.5.2, >= 8.1.0, < 8.1.4.1 (2w9f is 8.1 only)8.0.5.2, 8.1.4.1XSS in Action View text helpers, highlight, strip_tags, tag helpers, and Active Support MessagePack serializer
actionpack / actionmailboxGHSA-rwvh-fw6r-pwvp, GHSA-r9jg-fmfx-2gv6, GHSA-2586-8ghr-69fj, GHSA-5957-c7qm-m469, GHSA-gmj8-hvj3-49mwMedium / Low (3.1 to 5.9)< 8.0.5.2, >= 8.1.0, < 8.1.4.18.0.5.2, 8.1.4.1ActionController::Live streaming DoS, content-negotiation cache poisoning, CacheStore destroyed-session restoration, Mailgun replay, and missing SameSite

Technical analysis

1. GHSA-f3w6-w445-fwh9: ImageMagick MSL arbitrary file write/read on attachment analysis

When an application uses ImageMagick for Active Storage (config.active_storage.variant_processor = :mini_magick, the default for apps on load_defaults 6.1 or earlier), ActiveStorage::Analyzer::ImageAnalyzer::ImageMagick runs automatically in an Active Job (or inline) as soon as a file is attached to a record.

ImageMagick chooses its coder from the file’s content rather than the declared MIME type. Default distro policies on Debian and Ubuntu block Ghostscript (PS, PDF) in many releases, but do not block ImageMagick’s built-in MSL (Magick Scripting Language) coder, MPC, EPHEMERAL, or TEXT. As documented in commit 468aa9a93fc9 (reported by ryotak), an uploaded SVG or polyglot image reaches the MSL coder during MiniMagick::Image.new(file.path) at attach time. MSL XML scripts can read arbitrary local files into an image canvas and write output files to arbitrary paths on disk. When attachments are stored with the Disk service, the attacker can point an MSL write at the blob’s storage path on disk and then download the resulting blob to read config/master.key or secret_key_base.

To fix this without relying on the host OS’s /etc/ImageMagick-*/policy.xml, Rails 8.1.4.1 and 8.0.5.2 bundle a dedicated activestorage/lib/active_storage/image_magick/policy.xml and prepend its directory to MAGICK_CONFIGURE_PATH via MiniMagick.cli_env:

# activestorage/lib/active_storage/image_magick.rb (commit 468aa9a93fc98f5476b6821770f4ccfcb7f7d328)
module ActiveStorage
  module ImageMagick
    POLICY_DIRECTORY = File.expand_path("image_magick", __dir__)

    def self.apply_policy
      operator_paths = operator_paths(MiniMagick.cli_env["MAGICK_CONFIGURE_PATH"]).presence ||
        operator_paths(ENV["MAGICK_CONFIGURE_PATH"])

      MiniMagick.cli_env = MiniMagick.cli_env.merge("MAGICK_CONFIGURE_PATH" => configure_path(operator_paths)).freeze
    end
  end
end

ActiveStorage::MINIMAGICK_UNSECURABLE = ActiveStorage::MINIMAGICK_AVAILABLE && !MiniMagick.respond_to?(:cli_env=)

Because MiniMagick.cli_env= was added in mini_magick 5.1, any application using :mini_magick with mini_magick < 5.1 will now raise RuntimeError: Active Storage's ImageMagick security policy requires mini_magick 5.1 or later rather than running ImageMagick without the policy.

2. GHSA-v924-7rp8-4mxh: Blob#open tempfile extension spoofing and FFmpeg AviSynth RCE

When Active Storage downloads a blob to a local tempfile for VideoAnalyzer, AudioAnalyzer, VideoPreviewer, or ImageAnalyzer, ActiveStorage::Blob#open previously took the file extension directly from the user-supplied filename without checking whether that extension matched the blob’s content_type.

As shown in commit 72136ff39153 (reported by pirikara), uploading a text file named exploit.avs while declaring content_type: "video/mp4" caused Blob#open to create /tmp/ActiveStorage-123-...exploit.avs and pass that path to ffprobe and ffmpeg. Because FFmpeg selects its AviSynth demuxer purely from the .avs file extension, any FFmpeg binary compiled with --enable-avisynth (and AviSynthPlus installed) executes the uploaded script, allowing local file disclosure via rendered video frames or native shared-library loading (LoadPlugin) for RCE:

--- a/activestorage/app/models/active_storage/blob.rb
+++ b/activestorage/app/models/active_storage/blob.rb
@@ -321,7 +322,7 @@ def open(tmpdir: nil, &block)
       key,
       checksum: checksum,
       verify: !composed,
-      name: [ "ActiveStorage-#{id}-", filename.extension_with_delimiter ],
+      name: [ "ActiveStorage-#{id}-", tempfile_extension ],
       tmpdir: tmpdir,
       &block
     )
@@ -360,6 +361,25 @@ def service
   end
 
   private
+    def tempfile_extension
+      extension = filename.extension_with_delimiter
+      return "" if extension.blank?
+
+      type_for_extension = Marcel::MimeType.for(name: filename.to_s)
+      return "" unless type_for_extension == content_type
+
+      extension
+    end

3. GHSA-wm3x-v3qw-4jh3 and GHSA-8474-xrp6-wh69: Parameters#each_key and safe_constantize

In Action Pack (commit 8ba746e0a786), ActionController::Parameters delegated each_key directly to @parameters (ActiveSupport::HashWithIndifferentAccess). While each, each_pair, and each_value were patched in CVE-2020-8164 to return self (the unpermitted Parameters wrapper), params.each_key { |k| ... } returned the underlying HashWithIndifferentAccess, which Active Model mass assignment (User.update(...)) accepts without checking permitted?.

In Active Support (commit 95aa9e416016), safe_constantize rescued LoadError and built an unescaped regular expression via const_regexp(camel_cased_word):

--- a/activesupport/lib/active_support/inflector/methods.rb
+++ b/activesupport/lib/active_support/inflector/methods.rb
@@ -319,7 +319,8 @@ def safe_constantize(camel_cased_word)
         e.name.to_s == camel_cased_word.to_s)
     rescue LoadError => e
       message = e.respond_to?(:original_message) ? e.original_message : e.message
-      raise unless /Unable to autoload constant #{const_regexp(camel_cased_word)}/.match?(message)
+      constant_name = camel_cased_word.split("::").find { |part| !part.empty? } || camel_cased_word
+      raise unless message.include?("Unable to autoload constant #{constant_name}")
     end

Because const_regexp split the input on :: and joined non-empty segments into #{part}(::#{acc})? without calling Regexp.escape on each segment, any caller passing untrusted input to safe_constantize (including Action Cable’s WebSocket subscribe handler on /cable, which calls safe_constantize on the client’s channel name before looking up the channel class) allowed an unauthenticated remote client to compile arbitrary regular expressions in Onigmo (see our coverage of Ruby’s October Onigmo regex compiler CVEs).

Detection and remediation

1. Audit Gemfile.lock and application code for vulnerable patterns

# 1. Check locked versions of rails, activestorage, actionpack, activesupport, and mini_magick
rg -n '^\s+(rails|activestorage|actionpack|activesupport|actionview|actionmailbox|mini_magick) \(' Gemfile.lock

# 2. Search controllers and services for Parameters#each_key or #as_json passed into mass assignment
rg -n '\.each_key\b|\.as_json\b' app/controllers/ app/services/

# 3. Check whether Active Storage uses :mini_magick and whether Action Cable is mounted without auth
rg -n 'variant_processor|mount_path' config/
rg -n 'def connect' app/channels/application_cable/connection.rb 2>/dev/null

2. Upgrade to Rails 8.1.4.1 or 8.0.5.2 and rotate exposed secrets

  1. Upgrade Rails and mini_magick:
    bundle update rails mini_magick
    Verify that Gemfile.lock resolves to 8.1.4.1 or 8.0.5.2 (and mini_magick >= 5.1.0 if you use :mini_magick). Because Rails 8.0 security support ends on 7 November 2026, teams on 8.0.x should schedule their upgrade to 8.1.4.1.
  2. If you cannot upgrade immediately, apply the system ImageMagick policy workaround (GHSA-f3w6-w445-fwh9): Add these rules to /etc/ImageMagick-7/policy.xml (or /etc/ImageMagick-6/policy.xml):
    <policy domain="coder" rights="none" pattern="MSL"/>
    <policy domain="coder" rights="none" pattern="EPHEMERAL"/>
    <policy domain="coder" rights="none" pattern="TEXT"/>
    <policy domain="coder" rights="none" pattern="MPC"/>
    <policy domain="coder" rights="none" pattern="{URL,HTTP,HTTPS,FTP,FILE}"/>
    <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}"/>
    <policy domain="path" rights="none" pattern="@*"/>
  3. Strip or validate Forwarded headers at reverse proxies (GHSA-2gff-2mmg-m73p): On Rails 8.1.x with Rack 3, ensure your reverse proxy overwrites or strips client-supplied Forwarded headers, or set Rack::Request.forwarded_priority = [:x_forwarded] in an initializer if your proxy only sets X-Forwarded-For.
  4. Rotate credentials if exposed: If your application accepted untrusted file uploads with :mini_magick + Disk storage or an AviSynth-enabled ffmpeg build, rotate secret_key_base, config/master.key, and every credential stored in config/credentials.yml.enc or environment variables.

Timeline

  • 2026-09-01 to 2026-11-02: Rails maintainers prepare patches across activestorage, actionpack, activesupport, actionview, and actionmailbox for reports submitted by ryotak, pirikara, smlee, luryus, flixt / scheja, Igneous, and the Anthropic OSS Scanner.
  • 2026-11-03 (21:58 EST) / 2026-11-04 (02:58 UTC): Mike Dalessio announces Rails 8.0.5.2 and 8.1.4.1 on rubyonrails-security and oss-security (2026/11/04/2), publishing 21 GitHub Security Advisories (GHSA-f3w6-w445-fwh9 through GHSA-gmj8-hvj3-49mw).
  • 2026-11-07: Scheduled end of security support for the Rails 8.0 release series.

From research to remediation

Check whether this pattern exists in your codebase

Turn this research into a remediation workflow. Scan dependencies and package manifests for similar supply-chain risk, then prioritize fixes with reachability context.

References