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.2CVE mappings:CVE-2026-126082(CVSS 9.8 Critical, NVD’s second CVE mapping alongsideCVE-2026-122006forGHSA-f3w6-w445-fwh9Active Storage ImageMagick RCE/file write),CVE-2026-126186(CVSS 8.8 High forGHSA-v924-7rp8-4mxhActiveStorage::Blob#opentempfile extension RCE/file read),CVE-2026-126081(CVSS 7.5 High forGHSA-wm3x-v3qw-4jh3ActionController::Parameters#each_keyStrong Parameters bypass),CVE-2026-126080(CVSS 7.5 High forGHSA-8474-xrp6-wh69ActiveSupport::Inflector#safe_constantizeDoS),CVE-2026-126083(CVSS 7.4 High forGHSA-2gff-2mmg-m73pActionDispatch::RemoteIpspoofing),CVE-2026-126085(GHSA-hfr4-8rjc-97m2GCS direct-upload size-limit bypass),CVE-2026-126074(GHSA-p2pm-g2h6-7j5jActive Storage filename DoS),CVE-2026-126071(GHSA-4v2w-w6g6-f8f8Active Storage proxy streaming DoS),CVE-2026-126076(GHSA-2586-8ghr-69fjCacheStoredestroyed-session restoration),CVE-2026-126073(GHSA-r9jg-fmfx-2gv6Action Pack content-negotiation cache poisoning),CVE-2026-126075(GHSA-2w9f-fxwj-w2qfActive Support MessagePack XSS),CVE-2026-126067(GHSA-gmj8-hvj3-49mwmissingSameSiteattribute), andCVE-2026-126068(GHSA-5957-c7qm-m469Action Mailbox Mailgun signature replay). - Nokogiri
1.19.5(CVE-2026-126062,CVE-2026-126063, andCVE-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 JRubyNONETbypass 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:
GHSA-f3w6-w445-fwh9(CVSS 9.8 Critical,activestorage): Active Storage’sImageAnalyzer::ImageMagickruns 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 theMSL(Magick Scripting Language) coder or file-reading coders (TEXT,EPHEMERAL,MPC,URL,@*), an unauthenticated attacker uploading a polyglot or SVG attachment can invokeMSLto write arbitrary files on the server and, when the Disk storage service is used, read arbitrary files such asconfig/master.keyandsecret_key_base.GHSA-v924-7rp8-4mxh(CVSS 8.8 High,activestorage):ActiveStorage::Blob#opencreated temporary files namedActiveStorage-#{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 namedattack.avswithcontent_type: "video/mp4"causesffprobe/ffmpeg(when built with--enable-avisynth, as in the static builds fromffmpeg.org) to execute the script, disclosing local files or loading an attacker-uploaded shared library for remote code execution.GHSA-wm3x-v3qw-4jh3(CVSS 7.5 High,actionpack): An incomplete fix forCVE-2020-8164leftActionController::Parameters#each_keydelegated directly to@parameters(ActiveSupport::HashWithIndifferentAccess). Callingparams.each_key { ... }returned the underlying raw hash instead of theParametersinstance, stripping Strong Parameters enforcement (permitted?) when passed to Active Record mass assignment.GHSA-8474-xrp6-wh69(CVSS 7.5 High,activesupport/actioncable): When constant autoloading raisedLoadError,ActiveSupport::Inflector#safe_constantizeinterpolated unescaped::-split segments of the caller’s string into/Unable to autoload constant #{const_regexp(camel_cased_word)}/. Because Action Cable passes thechannelparameter of every WebSocketsubscribecommand straight tosafe_constantizebefore channel lookup, an unauthenticated client connecting to/cablecan feed arbitrary regex syntax into Ruby’s Onigmo compiler and crash the server process.GHSA-2gff-2mmg-m73p(CVSS 7.4 High,actionpack8.1.x): Rails8.1.0switchedActionDispatch::RemoteIptoRack::Request#forwarded_for, which under Rack 3 prefers the RFC 7239Forwardedheader overX-Forwarded-For. Behind reverse proxies that setX-Forwarded-Forwithout strippingForwarded, any client could spoofrequest.remote_ip(bypassingrate_limitand IP allowlists) without triggeringIpSpoofAttackError.
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
| Gem | Advisory ID | Severity | Affected versions | Fixed versions | Summary |
|---|---|---|---|---|---|
activestorage | CVE-2026-122006 (GHSA-f3w6-w445-fwh9) | Critical (9.8) | < 8.0.5.2, >= 8.1.0, < 8.1.4.1 | 8.0.5.2, 8.1.4.1 | Arbitrary file write and read via unrestricted ImageMagick coders (MSL, TEXT, EPHEMERAL, gs) during image analysis |
activestorage | GHSA-v924-7rp8-4mxh | High (8.8) | < 8.0.5.2, >= 8.1.0, < 8.1.4.1 | 8.0.5.2, 8.1.4.1 | Arbitrary file read and RCE via attacker-controlled tempfile extension in ActiveStorage::Blob#open (ffprobe / ffmpeg .avs / ImageMagick) |
actionpack | GHSA-wm3x-v3qw-4jh3 | High (7.5) | < 8.0.5.2, >= 8.1.0, < 8.1.4.1 | 8.0.5.2, 8.1.4.1 | Strong Parameters mass-assignment bypass when passing the return value of Parameters#each_key { ... } to a model |
activesupport | GHSA-8474-xrp6-wh69 | High (7.5) | < 8.0.5.2, >= 8.1.0, < 8.1.4.1 | 8.0.5.2, 8.1.4.1 | Unescaped Regexp compilation in safe_constantize LoadError rescue block (reachable unauthenticated via Action Cable /cable subscribe) |
actionpack | GHSA-2gff-2mmg-m73p | High (7.4) | >= 8.1.0, < 8.1.4.1 | 8.1.4.1 | Client IP spoofing in ActionDispatch::RemoteIp when proxy sets X-Forwarded-For and passes Forwarded through under Rack 3 |
activestorage | GHSA-x6mj-8jx9-qhqv, GHSA-4v2w-w6g6-f8f8, GHSA-p2pm-g2h6-7j5j, GHSA-3w93-6hmw-whh4, GHSA-hfr4-8rjc-97m2, GHSA-3f4q-8x5m-76v8 | Medium / Low (3.7 to 6.8) | < 8.0.5.2, >= 8.1.0, < 8.1.4.1 | 8.0.5.2, 8.1.4.1 | Proxy-mode session leak and streaming DoS, filename DoS, GCS direct-upload Content-Type / size-limit bypass, and video preview local file disclosure |
actionview / activesupport | GHSA-2p2f-4rq4-gjwc, GHSA-v6rj-xm57-3p59, GHSA-rq8q-p985-fjq7, GHSA-68p9-83h6-5wpj, GHSA-2w9f-fxwj-w2qf | Medium (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.1 | XSS in Action View text helpers, highlight, strip_tags, tag helpers, and Active Support MessagePack serializer |
actionpack / actionmailbox | GHSA-rwvh-fw6r-pwvp, GHSA-r9jg-fmfx-2gv6, GHSA-2586-8ghr-69fj, GHSA-5957-c7qm-m469, GHSA-gmj8-hvj3-49mw | Medium / Low (3.1 to 5.9) | < 8.0.5.2, >= 8.1.0, < 8.1.4.1 | 8.0.5.2, 8.1.4.1 | ActionController::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
- Upgrade Rails and
mini_magick:
Verify thatbundle update rails mini_magickGemfile.lockresolves to8.1.4.1or8.0.5.2(andmini_magick >= 5.1.0if you use:mini_magick). Because Rails8.0security support ends on 7 November 2026, teams on8.0.xshould schedule their upgrade to8.1.4.1. - 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="@*"/> - Strip or validate
Forwardedheaders at reverse proxies (GHSA-2gff-2mmg-m73p): On Rails8.1.xwith Rack 3, ensure your reverse proxy overwrites or strips client-suppliedForwardedheaders, or setRack::Request.forwarded_priority = [:x_forwarded]in an initializer if your proxy only setsX-Forwarded-For. - Rotate credentials if exposed: If your application accepted untrusted file uploads with
:mini_magick+ Disk storage or an AviSynth-enabledffmpegbuild, rotatesecret_key_base,config/master.key, and every credential stored inconfig/credentials.yml.encor environment variables.
Timeline
- 2026-09-01 to 2026-11-02: Rails maintainers prepare patches across
activestorage,actionpack,activesupport,actionview, andactionmailboxfor reports submitted byryotak,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 Rails8.0.5.2and8.1.4.1onrubyonrails-securityandoss-security(2026/11/04/2), publishing 21 GitHub Security Advisories (GHSA-f3w6-w445-fwh9throughGHSA-gmj8-hvj3-49mw). - 2026-11-07: Scheduled end of security support for the Rails
8.0release 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
- oss-security (2026/11/04/2): Rails security releases 8.0.5.2 and 8.1.4.1 (21 advisories)
- GitHub Advisory GHSA-f3w6-w445-fwh9 / CVE-2026-122006 (CVSS 9.8 Critical): Arbitrary file write and read in Active Storage image analysis
- NVD: CVE-2026-122006 (Ruby on Rails activestorage ImageMagick arbitrary file write and read)
- GitHub Advisory GHSA-v924-7rp8-4mxh (CVSS 8.8 High): Arbitrary file read and RCE in Active Storage video previews, analysis and image processing
- GitHub Advisory GHSA-wm3x-v3qw-4jh3 (CVSS 7.5 High): Strong Parameters bypass in Parameters#each_key in Action Pack
- GitHub Advisory GHSA-8474-xrp6-wh69 (CVSS 7.5 High): DoS vulnerability in Active Support safe_constantize
- GitHub Advisory GHSA-2gff-2mmg-m73p (CVSS 7.4 High): IP spoofing in Action Dispatch RemoteIp
- Socket Security (6 November 2026): Latest Free Certified Patch for Critical Rails Active Storage Vulnerability (CVE-2026-122006)