Rails, Rack, render, and static-boundary batch¶
Source: GitHub Security Advisories updated 2026-05-13.
This batch is durable because framework helper APIs are easy to treat as inherently safe. The advisories show that escaping, formatting, debug output, byte-range handling, and static-file path matching all need their own trust-boundary tests.
Advisories covered¶
- Active Support
SafeBuffer#%XSS, GHSA-89vf-4333-qx8v: formatted strings could cross an HTML-safety boundary inactivesupportbefore7.2.3.1,8.0.4.1, and8.1.2.1. - Active Support
number_to_delimitedReDoS, GHSA-cg4j-q9v8-6v38: delimiter formatting could consume excessive CPU on crafted input. Patchactivesupportto the fixed Rails release line. - Action View tag-helper XSS, GHSA-v55j-83pf-r9cq: Rails tag helpers could produce unsafe output in affected
actionviewversions before the fixed Rails release lines. - Action Pack debug-exception XSS, GHSA-pgm4-439c-5jp6: debug exception rendering could become scriptable in
actionpack 8.1.0through<8.1.2.1. - Decidim user-name XSS, GHSA-fc46-r95f-hq7g: attacker-controlled user names could become stored XSS in
decidim-corebefore0.30.5and in0.31.0.rc1. - Rack multipart byte-range DoS, GHSA-x8cg-fq8g-mxfx: excessive overlapping ranges could exhaust request-processing resources. Patch Rack to
2.2.23,3.1.21, or3.2.6. - Rack::Static
header_rulesbypass, GHSA-q4qf-9j86-f5mh: URL-encoded paths could bypass header rules before the fixed Rack releases. - Rack::Static prefix exposure, GHSA-h2jq-g4cq-5ppq: prefix matching could expose unintended files under the static root before the fixed Rack releases.
Operator triage¶
- Patch Rails/Rack stacks first when they expose user profile names, debug pages, static-file roots, or large file downloads.
- Confirm production disables debug exception rendering and that staging debug hosts are not internet-accessible.
- Search access logs for overlapping
Rangeheaders, URL-encoded static paths, unusually long numeric delimiters, and stored profile-name payloads. - Add regression tests that render representative untrusted strings through helper APIs rather than only testing direct template interpolation.
Durable controls¶
- Treat “safe string” helpers as context-sensitive encoders, not blanket declassification of user input.
- Put length, count, and overlap budgets on
Rangehandling before framework multipart helpers allocate work. - Canonicalize URL paths once before static-file allow/deny/header-rule decisions; do not mix decoded and raw prefix checks.
- Keep debug renderers behind auth, network policy, and production-off switches because they often combine stack metadata with HTML output.
November 11 follow-up: Rails 8.1 batch, representation-variant cache poisoning, session resurrection, and serializer round-trip trust¶
The Rails November 10-11 security releases (published 21:14-21:34Z alongside the Rack header legs already covered on the Sept 15 parser page) add six more framework trust-boundary legs worth keeping as bug-hunt checks:
- Vary-omission cache poisoning, GHSA-r9jg-fmfx-2gv6 / CVE-2026-126073: format negotiation reads
Accept,X-Requested-With, and (for XHR withoutAccept)Content-Type, butVary: Acceptwas only added when the request carried a usableAcceptheader and no priorVary. A shared cache that honoursVary(Thruster,Rack::Cache, CDNs) can store a no-Accept/XHR variant and serve it to later clients, visitors get layout-stripped HTML in place of JSON (or vice versa) until expiry. Bug-hunt shape: behind a Vary-honouring cache, request the same public action with{no Accept},X-Requested-With: XMLHttpRequestwith noAccept, and an app-setVary: Accept-Language(which blocked the append), then re-request as a normal browser and compare representations. Precondition to check first: actions renderedpublic/expires_in(cache-controlheaders on the response are the tell). Attacker can't choose content, so price it as representation-confusion/defacement-adjacent, not full poisoning. - Session resurrection on CacheStore logout, GHSA-2586-8ghr-69fj / CVE-2026-126076:
ActionDispatch::Session::CacheStorewrote the session back at end-of-request without checking the entry still exists, so a slow request finishing after a concurrentreset_session/server-side delete restores the destroyed session under its original ID, stolen cookies survive logout and server-side revocation. Fix records loaded-session identity and skips the write (one extra cache read per writeback = the fingerprint of patched builds). Lifecycle probe for any session backend: issue a long-running request holding the session, log out mid-flight, then finish the slow request and replay the old cookie. CookieStore unaffected; Dalli ≥4.0.0 unaffected, backend/version parity is the predicate. - Unauthenticated Action Cable → attacker-chosen regex, GHSA-8474-xrp6-wh69 / CVE-2026-126080:
safe_constantizebuilt aRegexpfrom the requested constant name onLoadError; Action Cable passes thechannelvalue of everysubscribecommand tosafe_constantizebefore any authentication, a default-mounted unauthenticated/cableendpoint reaches Ruby's regex compiler with attacker bytes. "Safe" nil-vs-raise wrappers that internally compile regexes from names are the audit target; grep app/framework code forRegexp.new/=~fed by constant/error strings. Proof: unauthenticated WSsubscribewith regex-metachar channel names against a lab/cable, watching worker CPU/crash only. - MessagePack round-trip resurrects
html_safe?, GHSA-2w9f-fxwj-w2qf / CVE-2026-126075:ActiveSupport::MessagePackserializedSafeBufferas bare bytes and restored it asSafeBuffer, so a buffer made unsafe by in-placegsub!came backhtml_safe, auto-escaping bypass after a cookie/cache round-trip (Rails 8.1:message_pack/:message_pack_allow_marshalserializers). Hunter angle: if the app serializes user-influenced strings through MessagePack cookies/cache, the deserialized value renders raw, try mutating-in-place paths and watch for unescaped reflection. Rolling-deploy incompatibility (old builds can't read fixed-format payloads) doubles as a version fingerprint. HackerOne researcher report, bounty-visible sink class. - GCS direct-upload length unbinding, GHSA-hfr4-8rjc-97m2 / CVE-2026-126085:
GCSService#url_for_direct_uploadnever bound declaredbyte_sizeinto the signed URL (the exact weakness CVE-2020-8162 fixed for S3 years earlier), upload larger than declared, stored blob keeps the declared size, defeating app-side size validations and quotas. Service-parity rule: when a framework fixed a signed-URL constraint for one storage backend, immediately test every sibling backend (GCS, Azure, S3-compatible, disk-proxy) for the missing header (x-goog-content-length-rangeabsent in the pre-fixheaders_for_direct_uploadresponse is the external tell). Pair with the Sept 20 media-page analyzer chain, oversized uploads then hit ffmpeg/ImageMagick. - NUL-byte filename persistent DoS (DB-dialect differential), GHSA-p2pm-g2h6-7j5j / CVE-2026-126074: Active Storage passes stored filenames unmodified to
File.basename/File.extname, which raise on NUL, persists on SQLite/MySQL/MariaDB (they accept NUL in string columns), so every later variant/preview render raises. PostgreSQL rejects the row = the dialect decides exploitability. Same rule class as the DB-behind-feature findings on the Sept 18 ORM page: reproduce input-validation bugs per dialect, and treat "who can upload" as the precondition; proof = disposable upload + request the variants route, purge after.
Cross-cutting: five of six legs carry HackerOne researcher credits, this batch is an active Rails bounty surface, and the precondition gates (session store choice, serializer config, storage service, cache backend, public caching headers) are enumerable from config leakage and response headers before any attack attempt.
November 12 follow-up: Action View tag helpers, the blank-name skip is checked before to_s, so a whitespace Symbol name becomes a nameless attribute (CVE-2026-126069 / GHSA-68p9-83h6-5wpj, actionview < 8.0.5.2 / < 8.1.4.1)¶
Incomplete fix for this page's May tag-helper XSS (CVE-2026-33168 / GHSA-v55j-83pf-r9cq): the patch skips blank attribute names, but tests blankness on the raw name before converting to a string. Symbol#blank? is Symbol#empty?, so a whitespace-only Symbol name such as :" " is not blank, reaches attribute escaping, and emits an attribute with no name, producing malformed HTML where a carefully crafted attribute value is misread by the browser as a separate attribute name (possible XSS). The asset tag helpers (image_tag, video_tag, audio_tag) symbolize their options, so a whitespace String name passed to them takes the same path. Affected precondition: applications that let users supply custom HTML attribute names.
Operator rules:
- Incomplete-fix genealogy is a first-class hunt: when a framework patches an escaping bug, immediately probe the patch's own boundary conditions (this one traded "empty name" for "blank-after-to_s"). Read the fix diff when public, otherwise fuzz the neighborhood:
name="",name=" ",name="\t", encoded whitespace, and Symbol-vs-String variants where the API has both. - Type-dependent predicates are bypass seams: any validation using a library
blank?/empty?/isEmptyon a value whose class varies (String vs Symbol vs other) is testing a different predicate per class. Attribute-name input that reachestag_optionssymbolization (asset helpers) is the trigger leg to test first. - Sink framing: nameless-attribute output is a parser-differential bug like this page's Rack::Static legs; report with the rendered bytes plus how the browser re-tokenizes (DevTools DOM vs raw response diff), and prove with inert attribute canaries (
data-skillz=...) before any event-handler shape.
November 12 second follow-up: Strong Parameters bypass via Parameters#each_key returning the raw hash, a 2020-fix sibling the patch never covered (CVE-2026-126081 / GHSA-wm3x-v3qw-4jh3, high, actionpack < 8.0.5.2 / < 8.1.4.1)¶
ActionController::Parameters#each_key delegates to the internal HashWithIndifferentAccess, so called with a block it returns that hash instead of the Parameters instance. The hash does not respond to permitted?, so Active Model mass assignment (new, assign_attributes, update) accepts it without raising ActiveModel::ForbiddenAttributesError, letting an unauthenticated attacker set unprotected attributes such as authorization flags. This is an incomplete fix of CVE-2020-8164 / GHSA-8727-m6gj-mc37, which hardened each, each_pair, and each_value to return the Parameters instance but left each_key delegated. The fix makes each_key yield keys and return the Parameters instance with a block (an Enumerator without one), so code that used the return value as a hash now hits the forbidden-attributes guard.
Operator rules extending this page:
- Enumerator-return-value asymmetry is a mass-assignment probe family. For any framework whose "safe params" wrapper guards mass assignment by object type, enumerate every iteration API (
each,each_key,each_value,each_pair,transform_keys,filter_map,select, ...) and test which ones return the inner unwrapped container.grep -rn "def each_key"plus a route that passes the return value intoassign_attributesis the white-box tell; black-box, hunt app code (or gems) doingparams.each_key { ... }and reusing the result. - Twenty-year-old CVE genealogy maps the remaining holes. CVE-2020-8164 patched three of four sibling methods; the fourth survived six years. When a mass-assignment or escaping advisory lands, list every method with the same delegation shape and probe each one; the fix diff's *un*touched siblings are the target list.
- Report shape: prove which attribute was unpersistable before (e.g.
admin: trueraising ForbiddenAttributesError via the normal path) vs accepted via theeach_keyleg, on a disposable account. Do not test privilege-flag writes on production identities.
November 12 third follow-up: Active Storage proxy mode, cookie-rotation rewrite ignores session_options[:skip] and caches a session on a public immutable response (CVE-2026-126077 / GHSA-x6mj-8jx9-qhqv, medium, actionpack < 8.0.5.2 / < 8.1.4.1)¶
A path around the CVE-2024-26144 fix. ActiveStorage::DisableSession relies on request.session_options[:skip] to keep the session cookie off the public, immutable responses of the Active Storage proxy controllers, but those controllers still load the session. When ActionDispatch::Cookies reads a signed/encrypted cookie written under a rotated secret (config.action_dispatch.cookies_rotations) or the old side of a :hybrid serializer migration, it rewrites the cookie in the current format on the response, and that rewrite ignores :skip. A request carrying an old-format session cookie therefore receives Set-Cookie on a cacheable public response; a shared cache that stores Set-Cookie there serves one user's session to later requesters of the same URL, or serves an attacker-planted session to other users. Fix: skip-session responses leave old-format cookies untouched (upgraded on the next non-skipped request).
Operator rules extending this page:
- Rotation/migration windows are the exploitable state, not steady state. The leak requires an old-format cookie, so the precondition is enumerable: apps with
cookies_rotationsconfigured or a:hybridserializer in flight (tells: dualsigned_packaging/serializer config leakage, or behavior differences between old and new cookie values). If you possess an old-format session artifact (backup, log, earlier capture), that artifact is the attack seed on a fully patched-in-shape app. skip-style guards usually cover the obvious write, not derived writes. Same shape as this page's static/proxy legs: the controller disables session storage, but the cookie-serializer's upgrade-on-read path is a second writer nobody gated. On any "public response" surface (CDN-backed downloads, immutable-asset routes, cacheable redirects), probe every header the response can grow:Set-Cookie,Vary, signed-URL refresh headers.- CDN cache-poisoning check remains the observable: request a public Active Storage proxy URL twice with an old-format cookie and inspect the CDN's cached copy for
Set-Cookie(age-hitter vs miss). Proof stays on your own session material only; if you see another user's cookie, stop, do not replay it, and report.
November 12 fourth follow-up: GCS direct uploads with cache_control sign V4 over only Cache-Control+Host, attacker picks the stored Content-Type and hosts bucket-path Service Worker script (CVE-2026-126084 / GHSA-3w93-6hmw-whh4, medium, activestorage < 8.0.5.2 / < 8.1.4.1)¶
When a GCS service is configured with cache_control, GCSService#url_for_direct_upload signs with V4, and the V4 signature covers only Cache-Control and Host. A direct-upload client can send any Content-Type (and omit the declared Content-MD5) without invalidating the URL, and GCS stores that supplied type as object metadata, which takes precedence over the response-content-type Active Storage sets on download URLs. Result: inline HTML served under the application's bucket path on storage.googleapis.com; script runs on the storage origin and can register a Service Worker scoped to the bucket path to read/replace later signed-URL responses for other users. GCS services without cache_control sign V2 (binds empty Content-Type + Content-MD5) and are unaffected; the fix reverts every GCS direct upload to V2 and drops Cache-Control from the signature.
Operator rules extending this page:
- Signature-scheme divergence inside one service is a configuration-observable fingerprint.
headers_for_direct_uploadon the direct-upload request tells you the scheme: aCache-Controlheader echoed back meanscache_controlis configured means V4 means Content-Type unbound. Test the sibling-parameter battery against whichever header set returns: Content-Type substitution, Content-MD5 omission, content-length mismatch (this page's hfr4 leg), and expiry overruns (V4's seven-day cap was lifted by the fix, a version tell). - Cross-origin script placement on shared storage hosts is still a real primitive. The delivered HTML executes on
storage.googleapis.com, not the app origin, so the report-worthy impact is the bucket-path Service Worker: subsequent signed URLs for other users in that bucket pass through attacker JS. Probe by uploading an inert marker (e.g. a<pre>payload) with substitutedContent-Type: text/htmlthrough your own direct-upload URL and checking the served Content-Type header; never register a real SW in testing. - Sibling sweep is unchanged from the hfr4 rule: any per-backend signature asymmetry (V2 vs V4, presigned vs signed-policy) means every "signed" constraint has a coverage list; enumerate what the signature actually covers before trusting any of it.