Ruby on Rails vulnerabilities

Web frameworks · sources: CVE.org/NVD + GitHub/OSV (rubygems) · refreshes every minute

Historical data is still loading (NVD, last 30 days): counts will keep growing over the next hours. See source status.

Period
Updating…

In the last 30 days, 9 Ruby on Rails vulnerabilities were published: 0 critical, 0 actively exploited. Most common weakness: CWE-915.

9vulnerabilities in 30 days
0critical
0exploited
Nov 12last published
CVSS score: 7.5 Severity: High Identifier: CVE-2026-126081GHSA-WM3X-V3QW-4JH3 Action Pack: Possible Strong Parameters Bypass in Parameters#each_key Package: actionpack fixed in 8.1.4.1 Published Published
Impact

ActionController::Parameters#each_key delegates to the internal ActiveSupport::HashWithIndifferentAccess that holds the request parameters, so when 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. An application that passes the return value of each_key to mass assignment could allow a remote, unauthenticated attacker to set attributes that the application does not permit, such as an authorization flag.

This is an incomplete fix of CVE-2020-8164, which made each, each_pair and each_value return the Parameters instance but left each_key delegated.

Details

The fixed releases define Parameters#each_key to yield each key and return the Parameters instance when given a block, as each, each_pair and each_value do, and to return an Enumerator without one. Code that used the return value of each_key as a hash now receives the Parameters instance, which mass assignment rejects unless it is permitted.

Affected applications

An application is affected if it passes the return value of ActionController::Parameters#each_key, called with a block, to mass assignment. Rails itself makes no such call.

Workarounds

Do not use the return value of each_key. Call it for its block only, and pass the permitted Parameters instance to mass assignment.

Releases

The fixed releases are available at the normal locations.

Patches for those who cannot upgrade at once:

Versions affected
  • actionpack < 8.0.5.2
  • actionpack >= 8.1, < 8.1.4.1
Credit

This issue was responsibly reported by HackerOne researcher smlee.

Exploitation
No known exploitation
EPSS
0.62% chance of exploitation in the next 30 days, higher than 44.3% of CVEs
CVSS
7.5 out of 10 · source GitHub
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
Versions
>= 8.1.0.beta1, < 8.1.4.1 · fixed in 8.1.4.1
Weakness
CWE-915
Linked via
ecosystem package
Sources
GitHub
Dates
published Nov 12, 2026 · first seen here 6 min ago
CVSS score: 7.5 Severity: High Identifier: CVE-2026-126080GHSA-8474-XRP6-WH69 Active Support: Possible DoS vulnerability in Active Support safe_constantize Package: activesupport fixed in 8.1.4.1 Published Published
Impact

When constant lookup raises LoadError, ActiveSupport::Inflector#safe_constantize (and String#safe_constantize) builds a regular expression from the requested constant name without escaping it, so a caller that passes untrusted input lets the attacker choose the source of a pattern that the application compiles. Crafted patterns can trigger defects in Ruby's regular expression compiler, possibly leading to a crash of the server process, and repeated requests could keep the application unavailable.

Action Cable passes the channel value of each subscribe command to safe_constantize before any channel lookup, so in the default configuration an unauthenticated client of the Action Cable endpoint can reach this code.

Details

The check that decides whether safe_constantize returns nil or re-raises the LoadError now matches the first segment of the constant name against the error message as a literal string, and no longer compiles a regular expression. It returns the same result as before for constant names that contain no regular expression syntax.

Affected applications

An application is affected if it meets all of these requirements:

  • Mounts Action Cable, which a new Rails application does by default at /cable (config.action_cable.mount_path), or otherwise passes untrusted input to safe_constantize.
  • Accepts Action Cable connections from untrusted clients. ApplicationCable::Connection#connect authenticates nobody unless the application adds a check.
Workarounds

Applications that do not use Action Cable can set config.action_cable.mount_path = nil to remove the endpoint. Applications that use Action Cable can call reject_unauthorized_connection in ApplicationCable::Connection#connect for unauthenticated clients, which limits exposure to authenticated users but does not remove it.

Releases

The fixed releases are available at the normal locations.

Patches for those who cannot upgrade at once:

Versions affected
  • activesupport < 8.0.5.2
  • activesupport >= 8.1, < 8.1.4.1
Credit

This issue was responsibly reported by Felix Tscheulin (flixt) through HackerOne researcher scheja, and independently by Bucky Wolfe (Igneous), who provided a proof of concept that crashes the server. It was also found by the Anthropic OSS Scanner (ANT-2026-ZUN5KU3Q).

Exploitation
No known exploitation
EPSS
0.80% chance of exploitation in the next 30 days, higher than 53.4% of CVEs
CVSS
7.5 out of 10 · source GitHub
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Versions
>= 8.1.0.beta1, < 8.1.4.1 · fixed in 8.1.4.1
Weakness
CWE-74
Linked via
ecosystem package
Sources
GitHub
Dates
published Nov 10, 2026 · first seen here 5 min ago
CVSS score: 7.4 Severity: High Identifier: CVE-2026-126083GHSA-2GFF-2MMG-M73P Action Pack: Possible IP spoofing in Action Dispatch RemoteIp Package: actionpack fixed in 8.1.4.1 Published Published
Impact

Since Rails 8.1.0, ActionDispatch::RemoteIp derives request.remote_ip from Rack::Request#forwarded_for, which under Rack 3 reads the RFC 7239 Forwarded header in preference to X-Forwarded-For. When a reverse proxy appends the client address to X-Forwarded-For but passes a client-supplied Forwarded header through unchanged, request.remote_ip returns an address chosen by the client, and the IP spoofing check does not raise, because it compares only Client-Ip with the forwarded addresses. An unauthenticated attacker could therefore spoof request.remote_ip, possibly bypassing IP-based access controls and rate limits keyed on the client address (including the default by: of rate_limit), and falsifying the client address in logs.

Details

The 8.1.0 change (2d084af8) switched ActionDispatch::RemoteIp from reading X-Forwarded-For directly to Rack's forwarded_for, in order to reuse Rack's port handling. Rails continues to honor Forwarded, the standard header.

In the fixed releases, when config.action_dispatch.ip_spoofing_check is enabled (the default), ActionDispatch::RemoteIp also compares the first untrusted client address in Forwarded with the first untrusted client address in X-Forwarded-For, as exact strings, and raises ActionDispatch::RemoteIp::IpSpoofAttackError when both headers are present and the addresses differ. Deployments whose proxies report the client address inconsistently between the two headers will receive this error after upgrading. See the actionpack CHANGELOG.

Affected applications

An application is affected if it meets all of these requirements:

  • Runs Rails 8.1.0 through 8.1.4 with Rack 3. Under Rack 2.2, forwarded_for reads only X-Forwarded-For.
  • Is served behind a proxy that does not remove or overwrite a client-supplied Forwarded header.
  • Relies on request.remote_ip for access control, rate limiting, or auditing.

The fix detects a spoofed Forwarded header only when the proxy also sets X-Forwarded-For. An application whose proxy passes a client-supplied Forwarded header through and sets no X-Forwarded-For remains exposed after upgrading, and should configure the proxy to remove or overwrite Forwarded, or apply the workaround below.

Mitigation
  • Upgrade to a fixed version of actionpack.
  • Configure reverse proxies to remove or overwrite any client-supplied Forwarded header.
Workarounds

Applications whose proxies set X-Forwarded-For can make Rack ignore the Forwarded header, restoring the client address resolution of Rails 8.0, by setting Rack::Request.forwarded_priority = [:x_forwarded] in an initializer. This setting is available in Rack 3.0.0 and later, and it also causes Rack to ignore Forwarded when determining the request scheme, host, and port.

Releases

The fixed releases are available at the normal locations.

Patches for those who cannot upgrade at once:

Versions affected
  • actionpack >= 8.1, < 8.1.4.1
Credit

This issue was responsibly reported by HackerOne researcher luryus.

Exploitation
No known exploitation
EPSS
0.37% chance of exploitation in the next 30 days, higher than 22.8% of CVEs
CVSS
7.4 out of 10 · source GitHub
CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N
Versions
>= 8.1.0.beta1, < 8.1.4.1 · fixed in 8.1.4.1
Weakness
CWE-348
Linked via
ecosystem package
Sources
GitHub
Dates
published Nov 10, 2026 · first seen here 5 min ago
CVSS score: 6.8 Severity: Medium Identifier: CVE-2026-126077GHSA-X6MJ-8JX9-QHQV Action Pack: Possible sensitive session information leak in Active Storage proxy mode Package: actionpack fixed in 8.1.4.1 Published Published
Impact

When ActionDispatch::Cookies reads a signed or encrypted cookie that was written under a rotated secret (config.action_dispatch.cookies_rotations) or in the format that a :hybrid cookie serializer migrates from, it writes the cookie back to the response in the current format, and that write ignores request.session_options[:skip]. ActiveStorage::DisableSession relies on that option to keep the session cookie off the public, immutable responses of the Active Storage proxy controllers, but those controllers still load the session, so a request carrying an old-format session cookie could receive the rewritten session cookie in Set-Cookie on a cacheable response. A shared cache that stores such a response together with its Set-Cookie header could then serve one user's session to later requesters of the same URL, or serve an attacker's session to other users.

Applications are affected when they serve Active Storage files through the proxy controllers, have a cookie rotation or a :hybrid serializer migration configured, and run behind a cache that stores Set-Cookie on public responses. This is a path around the fix for CVE-2024-26144.

Details

In the fixed releases, a response that skips the session leaves an old-format signed or encrypted cookie unchanged, and the next request that does not skip the session upgrades it. An application that skips the session on every request no longer upgrades its signed or encrypted cookies. Cookies that the application sets explicitly are still written. See the Action Pack CHANGELOG.

Workarounds

Configure caching proxies not to store responses that carry a Set-Cookie header, or complete the cookie rotation or serializer migration and remove it from the configuration.

Releases

The fixed releases are available at the normal locations.

Patches for those who cannot upgrade at once:

Credit

This issue was responsibly reported by HackerOne researcher flashmyname.

Exploitation
No known exploitation
EPSS
0.41% chance of exploitation in the next 30 days, higher than 27.4% of CVEs
CVSS
6.8 out of 10 · source GitHub
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:N
Versions
>= 8.1.0.beta1, < 8.1.4.1 · fixed in 8.1.4.1
Weakness
CWE-200
Linked via
ecosystem package
Sources
GitHub
Dates
published Nov 12, 2026 · first seen here 6 min ago
CVSS score: 5.9 Severity: Medium Identifier: CVE-2026-126072GHSA-RWVH-FW6R-PWVP Action Pack: Possible DoS vulnerability in Action Controller Live streaming Package: actionpack fixed in 8.1.4.1 Published Published
Impact

ActionController::Live::Buffer#close pushes its end-of-stream marker onto the response's bounded queue while it holds the buffer's monitor. When the client has stopped reading and the queue is full, the push blocks, and Buffer#abort, which runs when the client disconnects or a write times out, waits indefinitely for the same monitor. Each such response could permanently hold a web server thread and its ActionController::Live thread, possibly resulting in a DoS vulnerability through thread exhaustion.

Applications that stream responses with ActionController::Live, including send_stream, are affected. Applications that serve large files through Active Storage proxy mode are exposed to unauthenticated clients.

Releases

The fixed releases are available at the normal locations.

Patches for those who cannot upgrade at once:

Credit

This issue was found by the Anthropic OSS Scanner (ANT-2026-LDFW5N2T).

Exploitation
No known exploitation
EPSS
0.41% chance of exploitation in the next 30 days, higher than 27.0% of CVEs
CVSS
5.9 out of 10 · source GitHub
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
Versions
>= 8.1.0.beta1, < 8.1.4.1 · fixed in 8.1.4.1
Weakness
CWE-833
Linked via
ecosystem package
Sources
GitHub
Dates
published Nov 12, 2026 · first seen here 6 min ago
CVSS score: 4.8 Severity: Medium Identifier: CVE-2026-126073GHSA-R9JG-FMFX-2GV6 Action Pack: Possible cache poisoning in Action Pack content negotiation Package: actionpack fixed in 8.1.4.1 Published Published
Impact

Action Pack negotiates the format of a rendered response from the Accept, X-Requested-With and, for XHR requests without Accept, Content-Type request headers, but ActionController::Rendering#_set_vary_header adds Vary: Accept only when the request carries a usable Accept header and the response has no Vary header yet. A response to a request without Accept, or to an XHR request, therefore omits the headers that selected its representation, and a response whose Vary the application set before rendering (for example Vary: Accept-Language) never gains Accept. A shared cache that honours Vary could store such a response and serve it to later clients that request a different representation, possibly leading to cache poisoning in which visitors receive, until the entry expires, a page without its layout or HTML in place of JSON. The attacker cannot choose the content of the response.

Applications that render negotiated responses from actions marked public (for example with expires_in ..., public: true) behind a shared cache that honours Vary, such as Thruster or Rack::Cache, are affected.

Details

In the fixed releases, a rendered response whose format is not given by the URL lists Accept and X-Requested-With in Vary, and also Content-Type for an XHR request without Accept; when config.action_dispatch.ignore_accept_header is enabled, it lists only X-Requested-With. These fields are appended to an existing Vary value rather than skipped, and Vary: * is left unchanged. Shared caches can store more variants of such responses than before. See the Action Pack CHANGELOG for details.

Workarounds

Set Vary: Accept, X-Requested-With on negotiated responses in the application, for example in an after_action, or do not mark negotiated responses public.

Releases

The fixed releases are available at the normal locations.

Patches for those who cannot upgrade at once:

Credit

This issue was found by the Anthropic OSS Scanner (ANT-2026-7GHGLQGO, ANT-2026-5MT6C2R3).

Exploitation
No known exploitation
EPSS
0.49% chance of exploitation in the next 30 days, higher than 34.7% of CVEs
CVSS
4.8 out of 10 · source GitHub
CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:L
Versions
>= 8.1, < 8.1.4.1 · fixed in 8.1.4.1
Weakness
CWE-436
Linked via
ecosystem package
Sources
GitHub
Dates
published Nov 10, 2026 · first seen here 5 min ago
CVSS score: 4.7 Severity: Medium Identifier: CVE-2026-126075GHSA-2W9F-FXWJ-W2QF Active Support: Possible XSS vulnerability in Active Support MessagePack serializer Package: activesupport fixed in 8.1.4.1 Published Published
Impact

ActiveSupport::MessagePack serializes an ActiveSupport::SafeBuffer as its bytes alone and deserializes it as a new SafeBuffer, so a buffer that is no longer html_safe? (for example, one mutated in place with gsub!) is restored as html_safe. If such a buffer holds untrusted input and is stored through a MessagePack serializer, rendering it after it is loaded bypasses ERB auto-escaping, possibly leading to XSS.

Applications on Rails 8.1 are affected if they use a MessagePack serializer, such as config.action_dispatch.cookies_serializer = :message_pack or :message_pack_allow_marshal, or serializer: :message_pack for Rails.cache, ActiveSupport::MessageVerifier or ActiveSupport::MessageEncryptor, and store a SafeBuffer that was mutated in place with untrusted input. Rails 8.0 and earlier do not serialize SafeBuffer with MessagePack and are not affected.

Details

The fixed releases serialize a SafeBuffer that is not html_safe? with a marker and deserialize it as a String; a SafeBuffer that is html_safe? keeps the existing format. Versions without the fix cannot read an unsafe buffer serialized by the fixed releases, so during a rolling deploy a cookie or cache entry holding one could fail to load on a process that has not been upgraded.

Workarounds

Applications that cannot upgrade can convert a SafeBuffer to a String with to_str before storing it in a value that a MessagePack serializer writes.

Releases

The fixed releases are available at the normal locations.

Patches for those who cannot upgrade at once:

Credit

This issue was responsibly reported by HackerOne researcher jcwilk.

Exploitation
No known exploitation
EPSS
0.31% chance of exploitation in the next 30 days, higher than 16.8% of CVEs
CVSS
4.7 out of 10 · source GitHub
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N
Versions
>= 8.1.0.beta1, < 8.1.4.1 · fixed in 8.1.4.1
Weakness
CWE-79
Linked via
ecosystem package
Sources
GitHub
Dates
published Nov 10, 2026 · first seen here 5 min ago
CVSS score: 4.2 Severity: Medium Identifier: CVE-2026-126076GHSA-2586-8GHR-69FJ Action Pack: Possible restoration of destroyed sessions in Action Dispatch CacheStore Package: actionpack fixed in 8.1.4.1 Published Published
Impact

ActionDispatch::Session::CacheStore writes a session back to the cache at the end of each request that loaded it, without checking that the session's cache entry still exists. When a concurrent request destroys the session, through reset_session on logout or by deleting its cache entry on the server, a request that loaded the session earlier and finishes later restores it under its original session ID. Logout and server-side revocation could therefore fail to end a session, and an attacker who holds a stolen session cookie could keep that session valid across the victim's logout.

Applications that use config.session_store :cache_store are affected, with any cache backend. ActionDispatch::Session::CookieStore is not affected, nor is ActionDispatch::Session::MemCacheStore with Dalli 4.0.0 or later, whose session store does not write back a session that was deleted.

Details

The fixed releases record which session a request loaded and skip the write when that session's cache entry no longer exists. Changes that such a request makes to the destroyed session are discarded, and Rack logs a warning that the session could not be saved. Each request that writes back a session it loaded makes one additional cache read.

Releases

The fixed releases are available at the normal locations.

Patches for those who cannot upgrade at once:

Credit

Found by the team during internal code review.

Exploitation
No known exploitation
EPSS
0.29% chance of exploitation in the next 30 days, higher than 14.1% of CVEs
CVSS
4.2 out of 10 · source GitHub
CVSS:3.0/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:N
Versions
>= 8.1.0.beta1, < 8.1.4.1 · fixed in 8.1.4.1
Weakness
CWE-613
Linked via
ecosystem package
Sources
GitHub
Dates
published Nov 10, 2026 · first seen here 5 min ago
CVSS score: 3.1 Severity: Low Identifier: CVE-2026-126067GHSA-GMJ8-HVJ3-49MW Action Pack: Missing SameSite attribute on session cookies from Action Pack session stores Package: actionpack fixed in 8.1.4.1 Published Published
Impact

Action Pack session stores other than ActionDispatch::Session::CookieStore (CacheStore, MemCacheStore, and third-party stores built on AbstractStore, AbstractSecureStore or the session mixins) write the session cookie without a SameSite attribute, regardless of config.action_dispatch.cookies_same_site_protection, which defaults to :lax. Only CookieStore applies the configured policy. In browsers that do not treat a cookie without the attribute as SameSite=Lax, a cross-site request could carry the session cookie, possibly leading to cross-site request forgery against actions that do not verify an authenticity token, such as those of API-only applications.

Applications are affected when they use a session store other than CookieStore and do not pass same_site: to config.session_store.

Details

In the fixed releases, every session store sets the session cookie's SameSite attribute from cookies_same_site_protection when its options have no :same_site key. An explicit same_site: option, including same_site: nil, and a :same_site value in a store's DEFAULT_OPTIONS still take precedence.

Workarounds

Pass same_site: when configuring the session store, for example config.session_store :cache_store, same_site: :lax.

Releases

The fixed releases are available at the normal locations.

Patches for those who cannot upgrade at once:

Credit

This issue was responsibly reported by HackerOne researcher tjvc.

Exploitation
No known exploitation
EPSS
0.17% chance of exploitation in the next 30 days, higher than 3.6% of CVEs
CVSS
3.1 out of 10 · source GitHub
CVSS:3.0/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:L/A:N
Versions
>= 8.1.0.beta1, < 8.1.4.1 · fixed in 8.1.4.1
Weakness
CWE-352
Linked via
ecosystem package
Sources
GitHub
Dates
published Nov 10, 2026 · first seen here 5 min ago