Critical CVSS 9.8 Security news
Ruby on Rails fixes 21 flaws – a crafted image upload can make ImageMagick write and read server files
On 4 November 2026 the Ruby on Rails team shipped security releases 8.1.4.1 and 8.0.5.2, fixing 21 vulnerabilities. The worst is in Active Storage, the part of Rails that handles file uploads: an app that analyses images with ImageMagick can let an unauthenticated attacker write files on the server and, in common setups, read them – secret keys included.
Key points
- Rails 8.1.4.1 and 8.0.5.2, released on 4 November 2026, fix 21 security issues: one critical, four high, 13 medium and three low. None has a CVE yet – each is published as a GitHub security advisory (GHSA).
- The critical flaw, GHSA-f3w6-w445-fwh9 (CVSS 9.8), sits in Active Storage image analysis. A crafted upload can make ImageMagick write arbitrary files; with the Disk service, an attacker can also read any file the app can, such as secret_key_base and credentials.
- A second Active Storage flaw, GHSA-v924-7rp8-4mxh (CVSS 8.8), abuses the fact that ffmpeg, ffprobe and ImageMagick picked decoders from an attacker-chosen file extension. With some FFmpeg builds this can lead to file disclosure or code execution.
- Only Rails 8.1 and 8.0 receive security fixes, and 8.0 support ended on 7 November 2026. Rails 7.2 and older fall inside the affected range with no patch coming – the options are upgrading or hardening the ImageMagick policy by hand.
What happened
On 4 November 2026 the Ruby on Rails team released security versions 8.1.4.1 and 8.0.5.2. They fix 21 issues across the framework – Active Storage, Action Pack, Action View, Active Support and Action Mailbox – and the team strongly recommends upgrading as soon as possible. No CVE IDs have been assigned yet; each issue has a GitHub security advisory (GHSA).
The most serious is GHSA-f3w6-w445-fwh9 in Active Storage, the Rails component that handles uploaded files. Slovakia's national CERT, SK-CERT, rated it critical in warning V20261109-01 on 9 November. Neither Rails nor SK-CERT reports exploitation.
| Item | Value |
|---|---|
| Critical flaw | GHSA-f3w6-w445-fwh9 – file write and read via image analysis |
| CVSS 3.0 score | 9.8 (critical), scored by Rails |
| Weakness | CWE-1188 – insecure default initialisation |
| Exploitation | not reported (as of 10 Nov 2026) |
| Fixed | 4 Nov 2026 – Active Storage 8.1.4.1 and 8.0.5.2 |
| CVE | not yet assigned |
Technical details
The critical flaw (GHSA-f3w6-w445-fwh9). When a file is attached to a record, Active Storage analyses it straight away – for images, with ImageMagick. ImageMagick picks the coder that reads a file based on its content, not its extension, and some coders act on other files referenced inside the image. A crafted upload can therefore make ImageMagick write arbitrary files on the server. If attachments are stored with the Disk service, the attacker can also read files the app has access to, such as secret_key_base or credentials for other services. Attaching the file is enough; no variant, preview or explicit analysis call is needed.
Rails says one attack chain was reported but doesn't assume it's the only one. So instead of blocking a single trick, the fix ships an ImageMagick security policy (policy.xml). It denies the MSL coder, coders that read or delete other files, fetch remote or local references or draw to a screen, every Ghostscript-backed coder plus the gs delegate, and @filename indirection. ImageMagick reads every policy on its search path, so this one is added on top of the host policy and applies to all ImageMagick commands that mini_magick spawns.
The second Active Storage flaw (GHSA-v924-7rp8-4mxh, CVSS 3.1 8.8, high). Temporary files kept the extension from the uploaded filename, which the user controls. ffprobe (video and audio analysis), ffmpeg (video previews) and ImageMagick then chose decoders based on it. If FFmpeg is built with AviSynth support – the advisory says GPL builds for Windows and Linux from ffmpeg.org have it, while upstream defaults and common Linux distribution and Homebrew packages don't – an uploaded .avs file can disclose files through the preview image, or even lead to code execution in the FFmpeg process. Unlike the critical flaw, its score assumes an authenticated attacker. The fix keeps the extension only if it matches the detected content type.
Other high-severity issues: a Strong Parameters bypass via Parameters#each_key (GHSA-wm3x-v3qw-4jh3, CVSS 7.5 – an incomplete fix of CVE-2020-8164, exploitable only if the app passes the result of each_key into mass assignment), IP spoofing in RemoteIp (8.1 only) and a denial of service in safe_constantize. The rest are XSS issues in Action View helpers, denial-of-service bugs, and weaknesses in Google Cloud Storage direct uploads and session handling.
We don't publish exploitation details.
Who is affected
- Rails apps older than 8.1.4.1 (8.1 series) and older than 8.0.5.2 – per the advisory, that includes 7.2 and everything older.
- For the critical flaw, only apps that accept files from untrusted users and use Active Storage with ImageMagick (
config.active_storage.variant_processor = :mini_magick, the default forload_defaults 6.1and earlier) without a policy that denies the dangerous coders. The advisory says the packaged Debian and Ubuntu policies don't. - File reads require the Disk service; file writes don't.
- Rails 7.2 and older won't get a fix: the maintenance policy lists security support only for 8.1 (until 10 October 2027) and 8.0 (until 7 November 2026, so already over).
How to tell if you were compromised
Neither Rails nor SK-CERT has published indicators of compromise. The checks below are our own suggestions:
- Uploaded files: look in Active Storage for attachments whose content doesn't match their type (PostScript, SVG or script text instead of an image) and for files with an
.avsextension. - File system: unexpected files written by the app's user, especially in code directories,
public/or the home directory. - Processes: unusual child processes such as
magick/convert,gs,ffmpegorffprobe, and shells spawned from them. - Secret misuse: signed cookies that don't match real sessions, or unexpected activity on storage and database accounts.
What to do
- Upgrade to Rails 8.1.4.1. The 8.0 series (8.0.5.2) won't receive further fixes, so plan the move to 8.1 soon.
- Upgrade mini_magick to 5.1 or later – with
:mini_magick, older versions raise an exception at boot after the Rails upgrade. - Make sure the policy actually applies. Apps that replace
MiniMagick.cli_envafter boot, clear the environment withMiniMagick.cli_prefixor install their ownMiniMagick::Shelldon't get the Rails policy and need the rules in ImageMagick's system policy. GraphicsMagick ignores ImageMagick policies. - If you can't upgrade yet (or you're on Rails 7.2 or older): copy the rules from the shipped
policy.xmlinto the system policy, for example/etc/ImageMagick-7/policy.xml. At a minimum, deny the MSL coder, thegsdelegate and the Ghostscript-backed coders (PS, PS2, PS3, EPS and variants, PDF, AI, EPDF, PDFA, POCKETMOD, XPS, PCL). For the extension flaw, you can temporarily removeVideoPreviewer,VideoAnalyzerandAudioAnalyzerfrom the Active Storage configuration, or use an FFmpeg build without AviSynth. - Rotate secrets if attachments are stored on disk (or the AviSynth conditions were met):
secret_key_base, the master key, everything inconfig/credentials.yml.enc, storage and database credentials and third-party tokens. Don't keep the old key as a fallback, and expect users to be signed out. - Apps that need PDF or PostScript previews must explicitly re-allow the
gsdelegate and its coders in the system policy after upgrading – and should ask whether they really need to render those formats for anonymous users.
Timeline
Updates
- 10 November 2026 – first version of this article.
FAQ
We're on Rails 7.2. Are we affected?
Yes, if the app processes images with ImageMagick. The advisory lists every Active Storage version below 8.0.5.2 as vulnerable, which includes 7.2 and older. According to the Rails maintenance policy, those series no longer get security fixes. Until you move to Rails 8.1, add the rules from the advisory to ImageMagick's system policy (see What to do).
We use libvips, not ImageMagick. Are we safe?
The critical flaw only affects processing through ImageMagick (variant_processor :mini_magick, the default up to load_defaults 6.1). But Active Storage also uses ImageMagick to analyse images, so if it's installed on the server, upgrade anyway. The file-extension flaw also covers ffmpeg and ffprobe for video and audio.
Isn't the Debian or Ubuntu ImageMagick policy enough?
Not according to the advisory: the packaged Debian and Ubuntu policies don't deny the coders involved. The Rails fix ships its own policy, which ImageMagick applies on top of the host policy.
Why rotate secret_key_base if we haven't seen an attack?
If attachments are stored on disk and the app was vulnerable, an attacker could have read secret files without leaving obvious traces. The advisory recommends rotating secret_key_base, the master key, everything in credentials.yml.enc, storage and database credentials and third-party tokens. Rotating secret_key_base signs users out and invalidates signed cookies and file URLs.
Sources
- Ruby on Rails – Rails Versions 8.0.5.2 and 8.1.4.1 have been released! (4 Nov 2026)
- Rails – GHSA-f3w6-w445-fwh9: Possible arbitrary file write and read in Active Storage image analysis
- Rails – GHSA-v924-7rp8-4mxh: Possible arbitrary file read and remote code execution in Active Storage video previews, analysis and image processing
- Rails – GHSA-wm3x-v3qw-4jh3: Possible Strong Parameters bypass in Parameters#each_key
- SK-CERT – Security warning V20261109-01: Ruby on Rails Active Storage (9 Nov 2026, Slovak)
- Ruby on Rails – Maintenance Policy
- ImageMagick – Security Policy
Spotted a mistake? Let us know and we will correct it openly.