Rails Active Storage file handling allows file read and code execution
CVE-2026-126186 and 20 more
Rails sites that accept uploads can be hacked, and server files read!
- CVE
- CVE-2026-126186 and 20 more
- Score
- CVSS 9.8
- First seen
Mitigation
Update to 8.1.4.1 on the 8.1 line or 8.0.5.2 on the 8.0 line. For CVE-2026-126067 only, you can set same_site: :lax in the session store as a stopgap; for the other CVEs the update is the only fix.
Update to at least the version for your product:
- Rails 8.1 8.1.4.1 or later
- Rails 8.0 8.0.5.2 or later
Can't update yet?
Add this line to the config file:
config.session_store :cache_store, same_site: :lax
A wrong setting can stop the service or lock you out. Check the source links below first.
Summary
Active Storage picks analysis tools by the uploaded filename's extension, so an attacker's file can read server files or run code in the FFmpeg or ImageMagick process. Rails apps that accept uploads from untrusted users and analyze or preview video or audio, or process images with ImageMagick, are affected. The same update also fixes several other flaws, including session cookie, request forgery and denial of service issues.
Affected when
- CVE-2026-126186 uploads from untrusted users are analyzed as video or audio, previewed, or processed with ImageMagick
- CVE-2026-126080 Action Cable accepts subscriptions from unauthenticated clients
- CVE-2026-126081 the return value of each_key, called with a block, is passed to mass assignment
- CVE-2026-126083 Rails 8.1.0 through 8.1.4 with Rack 3, behind a proxy that does not strip the Forwarded header
- CVE-2026-126077 rotated cookie secrets or a hybrid serializer migration, Active Storage proxy served, cache stores Set-Cookie
- CVE-2026-126070 strip_tags output rendered inside an HTML attribute value
- CVE-2026-126078 highlighter that places a placeholder inside an attribute value
- CVE-2026-126079 HTML5 sanitizer used, with user text passed to highlight or simple_format
- CVE-2026-126072 streaming with ActionController::Live or Active Storage proxy mode
- CVE-2026-126085 direct uploads to Google Cloud Storage accepted
- CVE-2026-126071 a service that streams downloads in several requests, such as Amazon S3
- CVE-2026-126073 a shared cache honouring Vary stores responses from public actions
Incidents by product: rails
Distribution packages (15) (every link below opens in a new tab)
- Debian 13 (trixie)rails · not affected CVE-2026-126083, CVE-2026-126071, CVE-2026-126075
- Debian 13 (trixie)rails · not fixed yet CVE-2026-126186, CVE-2026-126080, CVE-2026-126081, CVE-2026-126077, CVE-2026-126070, CVE-2026-126078, CVE-2026-126079, CVE-2026-126072, CVE-2026-126085, CVE-2026-126073, CVE-2026-126069, CVE-2026-126084, CVE-2026-126074, CVE-2026-126076, CVE-2026-126068, CVE-2026-126188, CVE-2026-126067
- Debian 12 (bookworm)rails · fixed in 2:6.1.7.10+dfsg-1~deb12u4 CVE-2026-126186, CVE-2026-126080, CVE-2026-126081, CVE-2026-126077, CVE-2026-126078, CVE-2026-126072, CVE-2026-126085, CVE-2026-126073, CVE-2026-126069, CVE-2026-126074, CVE-2026-126076, CVE-2026-126068, CVE-2026-126188, CVE-2026-126067
- Debian 12 (bookworm)rails · not affected CVE-2026-126083, CVE-2026-126070, CVE-2026-126079, CVE-2026-126071, CVE-2026-126084, CVE-2026-126075
- RHEL 9ruby · not affected CVE-2026-126080, CVE-2026-126075
- SLES 16.1rmt-server · not affected CVE-2026-126186, CVE-2026-126085, CVE-2026-126071, CVE-2026-126084, CVE-2026-126074, CVE-2026-126188
- SLES 16.1rmt-server · not fixed yet CVE-2026-126081, CVE-2026-126083, CVE-2026-126077, CVE-2026-126070, CVE-2026-126072, CVE-2026-126073, CVE-2026-126069, CVE-2026-126076, CVE-2026-126067
- SLES 16.0rmt-server · not affected CVE-2026-126186, CVE-2026-126085, CVE-2026-126071, CVE-2026-126084, CVE-2026-126074, CVE-2026-126188
- SLES 16.0rmt-server · not fixed yet CVE-2026-126081, CVE-2026-126083, CVE-2026-126077, CVE-2026-126070, CVE-2026-126072, CVE-2026-126073, CVE-2026-126069, CVE-2026-126076, CVE-2026-126067
- SLES 15 SP7rmt-server · not affected CVE-2026-126186, CVE-2026-126085, CVE-2026-126071, CVE-2026-126084, CVE-2026-126074, CVE-2026-126188
- SLES 15 SP7rmt-server · not fixed yet CVE-2026-126081, CVE-2026-126083, CVE-2026-126077, CVE-2026-126070, CVE-2026-126072, CVE-2026-126073, CVE-2026-126069, CVE-2026-126076, CVE-2026-126067
- openSUSE Leap 16.0hawk2 · not affected CVE-2026-126186, CVE-2026-126077, CVE-2026-126085, CVE-2026-126071, CVE-2026-126084, CVE-2026-126074, CVE-2026-126188
- openSUSE Leap 16.0hawk2 · not fixed yet CVE-2026-126081, CVE-2026-126083, CVE-2026-126070, CVE-2026-126072, CVE-2026-126073, CVE-2026-126069, CVE-2026-126076, CVE-2026-126067
- openSUSE Leap 16.0rmt-server · not affected CVE-2026-126186, CVE-2026-126085, CVE-2026-126071, CVE-2026-126084, CVE-2026-126074, CVE-2026-126188
- openSUSE Leap 16.0rmt-server · not fixed yet CVE-2026-126081, CVE-2026-126083, CVE-2026-126077, CVE-2026-126070, CVE-2026-126072, CVE-2026-126073, CVE-2026-126069, CVE-2026-126076, CVE-2026-126067
Sources: Debian Security Tracker · Red Hat Security Data (CC BY 4.0) · SUSE CSAF VEX (CC BY 4.0)
21 CVEs (every link below opens in a new tab)
- CVE-2026-126186
- CVE-2026-126080
- CVE-2026-126081
- CVE-2026-126083
- CVE-2026-126077
- CVE-2026-126070
- CVE-2026-126078
- CVE-2026-126079
- CVE-2026-126072
- CVE-2026-126085
- CVE-2026-126071
- CVE-2026-126073
- CVE-2026-126069
- CVE-2026-126084
- CVE-2026-126075
- CVE-2026-126074
- CVE-2026-126076
- CVE-2026-126068
- CVE-2026-126188
- CVE-2026-126067
- CVE-2026-126082
Read the advisory · github.com (opens in a new tab)
Each of the 21 CVEs (every link below opens in a new tab)
- CVE-2026-126186Through the decoder picked from the file extension, an attacker can read server files or run programs. CVSS 8.8
- CVE-2026-126080An unauthenticated request can crash the server process and keep the app down. CVSS 7.5
- CVE-2026-126081Request values saved in bulk can set protected attributes such as an authorization flag. CVSS 7.5
Show 18 more
- CVE-2026-126083Forged client addresses can bypass IP-based access limits and rate limits. CVSS 7.4
- CVE-2026-126077A stale session cookie in a shared cache can expose one user's session to others. CVSS 6.8
- CVE-2026-126070Input placed in an attribute value can inject web scripts. CVSS 6.1
- CVE-2026-126078Highlighted output can end an attribute and add new attributes. CVSS 6.1
- CVE-2026-126079A sanitizer gap lets markup inside attribute values become live and run web scripts. CVSS 6.1
- CVE-2026-126072Stalled responses can hold server threads until the server runs out of them. CVSS 5.9
- CVE-2026-126085Direct uploads can exceed the declared file size limit. CVSS 5.3
- CVE-2026-126071A storage error mid-download can block server threads and stall the server. CVSS 5.3
- CVE-2026-126073A malformed response can be cached and served to other visitors. CVSS 4.8
- CVE-2026-126069A whitespace-only HTML attribute name can produce malformed markup that lets injected scripts run. CVSS 4.7
- CVE-2026-126084An attacker can upload a file with a chosen content type that is served as inline HTML under the bucket path, and use it to register a Service Worker that reads or replaces other users' responses. CVSS 4.7
- CVE-2026-126075An unsafe string modified in place is restored as HTML-safe after MessagePack round-trip, so rendering it bypasses auto-escaping and can enable XSS. CVSS 4.7
- CVE-2026-126074A filename containing a NUL byte makes pages that show the attachment fail repeatedly, keeping them down. CVSS 4.3
- CVE-2026-126076A concurrent request can revive a logged-out session, so a stolen session cookie stays valid after logout. CVSS 4.2
- CVE-2026-126068A captured Mailgun webhook signature can be replayed with a future timestamp to submit forged inbound emails. CVSS 3.7
- CVE-2026-126188An attacker can upload an HLS playlist that makes previews or analysis open a local media file, disclosing it when the attacker knows its path. CVSS 3.7
- CVE-2026-126067Other session stores leave SameSite off the session cookie, so cross-site requests can carry the login cookie and forge requests. CVSS 3.1
- CVE-2026-126082An attacker who uploads a crafted file can write arbitrary files on the server and, with Disk storage, read files the application can access, which may lead to code execution. Score pending
Advisory (20): github.com
- GHSA-gmj8-hvj3-49mw (opens in a new tab)
- GHSA-5957-c7qm-m469 (opens in a new tab)
- GHSA-68p9-83h6-5wpj (opens in a new tab)
- GHSA-rq8q-p985-fjq7 (opens in a new tab)
- GHSA-rwvh-fw6r-pwvp (opens in a new tab)
- GHSA-r9jg-fmfx-2gv6 (opens in a new tab)
- GHSA-p2pm-g2h6-7j5j (opens in a new tab)
- GHSA-2586-8ghr-69fj (opens in a new tab)
- GHSA-x6mj-8jx9-qhqv (opens in a new tab)
- GHSA-v6rj-xm57-3p59 (opens in a new tab)
- GHSA-2p2f-4rq4-gjwc (opens in a new tab)
- GHSA-8474-xrp6-wh69 (opens in a new tab)
- GHSA-wm3x-v3qw-4jh3 (opens in a new tab)
- GHSA-3w93-6hmw-whh4 (opens in a new tab)
- GHSA-hfr4-8rjc-97m2 (opens in a new tab)
- GHSA-v924-7rp8-4mxh (opens in a new tab)
- GHSA-3f4q-8x5m-76v8 (opens in a new tab)
- GHSA-4v2w-w6g6-f8f8 (opens in a new tab)
- GHSA-2w9f-fxwj-w2qf (opens in a new tab)
- GHSA-2gff-2mmg-m73p (opens in a new tab)