CVE Intelligence
Skip to main content
HIGH

CVE-2026-41316

CVE-2026-41316 — ERB has an @_init deserialization guard bypass via def_module / def_method / def_class

ERB is a templating system for Ruby. Ruby 2.7.0 (before ERB 2.2.0 was published on rubygems.org) introduced an `@_init` instance variable guard in `ERB#result` and `ERB#run` to prevent code execution when an ERB object is reconstructed via `Marshal.load` (deserialization). However, three other public methods that also evaluate `@src` via `eval()` were not given the same guard: `ERB#def_method`, `ERB#def_module`, and `ERB#def_class`. An attacker who can trigger `Marshal.load` on untrusted data in a Ruby application that has `erb` loaded can use `ERB#def_module` (zero-arg, default parameters) as a code execution sink, bypassing the `@_init` protection entirely. ERB 4.0.3.1, 4.0.4.1, 6.0.1.1, and 6.0.4 patch the issue.

Published Updated Sources: cvelistV5, GitHub_M

Triage

Is it exploited, how likely is exploitation, what does it touch, and how severe do the scoring sources call it.

Exploitation

Unreported

no source claims exploitation

EPSS

1%

chance of exploitation in 30 days

Affects

ruby

13 products listed

CVSS base

8.1

HIGH

CISA SSVC assessment

Three decision points CISA publishes for the CVEs it assesses · SSVC 2.0.3. A stakeholder decision, not a severity score.

CISA

Exploitation

None

none · proof-of-concept · active

Automatable

No

can an attacker script all four kill-chain steps

Technical impact

Total

partial · total control of the vulnerable component

Affected scope

The catalog records vendors and products as separate lists, not pairs, so which product belongs to which vendor is not something this page can say.

Vendors (2)

Products (13)

erbred hat enterprise linux 10red hat enterprise linux 10 0 extended update supportred hat enterprise linux 8red hat enterprise linux 9red hat enterprise linux 9 0 update services for sap solutionsred hat enterprise linux 9 2 update services for sap solutionsred hat enterprise linux 9 4 update services for sap solutionsred hat enterprise linux 9 6 extended update supportred hat enterprise linux 6red hat enterprise linux 7red hat hardened imagesred hat openshift container platform 4

Every base score collected

Sources score independently and disagree; each row says who scored it and under which version.

ScoreVersionSeverityExpl.ImpactSource
8.1CVSS 3.1HIGHcvelistV5

Weakness & attack patterns

  • CWE-693
  • CWE-502

Attack patterns reported against this CVE. The ATT&CK techniques below are inferred from its weakness class.

  • T1574.010Hijack Execution Flow: ServicesFile Permissions Weakness
  • T1083File and Directory Discovery
  • T1574.005Hijack Execution Flow: Executable Installer File Permissions Weakness

References

17 on the record

Elsewhere on this site

  • rubyevery CVE for this vendor
  • redhatevery CVE for this vendor
  • CWE-693other pages naming this weakness

Not in any source we poll

Listed rather than left blank: an empty field and an unmeasured one look identical on screen, and only one is a reason to look elsewhere.

  • No confirmed IOCs, IP addresses, domains, file hashes, or malware artifacts supplied.
  • No organization-specific asset inventory, compensating-control status, or patch deployment evidence supplied.
  • No exploit packet captures, log samples, or incident case IDs supplied.