Exploited now
Vulnerability WatchVulnerabilities, exploits & advisories — updated every 15 minutes
Alerts

Home › CVE › Ruby

CVE-2026-126081 — rails

High · CVSS 7.5EPSS 0.6% First seen November 10, 2026

One of 9 rails vulnerabilities published together by NVD: our article covers all of them.

RubyVulnerabilities

Analysis

Rails Action Pack CVE-2026-12608: each_key with a block bypasses mass-assignment protection

CVE-2026-12608 is a high-severity (CVSS 7.5) flaw in Rails Action Pack where ActionController::Parameters#each_key returns an unprotected internal hash, which mass assignment accepts. Applications that pass that return value into mass assignment can be affected, and fixed versions are 8.1.4.1 and 8.0.5.2. ### What the flaw is Action Pack is the Rails component that handles web requests. According to the NVD record, calling ActionController::Parameters#each_key with a block returns the internal hash that stores request parameters, not the Parameters object. That hash has no permitted? method, so Active Model mass assignment methods such as new, assign_attributes and update accept it without raising ActiveModel::ForbiddenAttributesError. The protection that normally blocks unpermitted attributes is therefore skipped. ### What's affected The NVD entry says an application is affected only if it passes the return value of each_key, called with a block, into mass assignment. Rails itself does not make that call. The record describes this as an incomplete fix of CVE-2020-8164, which made each, each_pair and each_value return the Parameters instance but left each_key unchanged. The sources list fixed versions 8.1.4.1 and 8.0.5.2 and do not give a fuller list of affected version ranges. ### How serious is it NVD rates the issue HIGH, with a CVSS score of 7.5. The source describes a remote, unauthenticated attacker setting attributes the application does not intend to permit, such as an authorization flag. The real impact depends on which model attributes the application exposes through this code path. ### Exploitation status The sources do not say whether this flaw is being exploited in the wild, and they contain no reports of active exploitation. ### What to do Upgrade to 8.1.4.1 or 8.0.5.2, depending on your release line. Search your codebase for each_key calls that take a block and check whether their results reach create, update or assign_attributes. Where that pattern exists, replace it with explicit permit-based parameter handling, and make sure sensitive attributes such as role or permission flags are never mass-assignable.

Written with AI assistance from the sources listed on this page; check the vendor advisory before acting.

Summary

Action Pack is a framework for handling and responding to web requests. Prior to 8.1.4.1 and 8.0.5.2, 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. 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. This issue is fixed in versions 8.1.4.1 and 8.0.5.2.

Description: NIST National Vulnerability Database (public domain)

Severity breakdown

High · 7.5 CVSS 3.1 base score from the CNA (github.com)

An attacker without an account can exploit this over the network, without any user action.

Attack from
the network (remotely)
Attack complexity
low (no special conditions)
Login needed
no
User action needed
no
Scope
stays within the vulnerable component
Impact
high on integrity, none on confidentiality and availability

Vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N · CVSS 3.0 7.5 from GitHub: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N

Weakness

  • CWE-915: Improperly Controlled Modification of Dynamically-Determined Object Attributes

Affected and fixed versions

ProductAffected versionsFixed in
actionpack (RubyGems)≥ 8.1.0.beta1, < 8.1.4.18.1.4.1
< 8.0.5.28.0.5.2
rails>= 8.1, < 8.1.4.1, < 8.0.5.2—

From the GitHub Advisory Database and the vendor's CVE record; confirm with the vendor advisory before relying on a version number.

References by type

Vendor advisories

Patches and fixed releases

Other references

Details from NVD (public domain), the GitHub Advisory Database (CC BY 4.0).

Affected

  • rails

What to do

  • Check whether you run an affected product or version and apply the vendor's update or mitigation.
  • Follow the vendor advisory and the references below for fixed versions and workarounds.

Frequently asked questions

What is CVE-2026-126081?

CVE-2026-12608 is a high-severity (CVSS 7.5) flaw in Rails Action Pack where ActionController::Parameters#eachkey returns an unprotected internal hash, which mass assignment accepts. Applications that pass that return value into mass assignment can be affected, and fixed versions are 8.1.4.1 and 8.0.5.2. What the flaw is Action Pack is the Rails component that handles web requests. Weakness type: Improperly Controlled Modification of Dynamically-Determined Object Attributes (CWE-915).

How severe is CVE-2026-126081?

CVE-2026-126081 has a CVSS 3.1 base score of 7.5 (high), from the CNA (github.com). An attacker without an account can exploit this over the network, without any user action.

Is CVE-2026-126081 being exploited?

Not as far as is known: CVE-2026-126081 is not in CISA's Known Exploited Vulnerabilities catalog as of November 28, 2026. EPSS estimates a 0.6% chance that it is exploited in the next 30 days.

Which versions are affected by CVE-2026-126081?

actionpack (RubyGems) ≥ 8.1.0.beta1, < 8.1.4.1 (fixed in 8.1.4.1); actionpack (RubyGems) < 8.0.5.2 (fixed in 8.0.5.2); rails >= 8.1, < 8.1.4.1, < 8.0.5.2.

How do I fix CVE-2026-126081?

Update to a fixed release: actionpack (RubyGems) 8.1.4.1; actionpack (RubyGems) 8.0.5.2.

Timeline & sources

References

Related vulnerabilities & news