8.1

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

Deferred
AliasesSUSE-SU-2026:3556-1RHSA-2026:18030RHSA-2026:18039
Published 24-04-2026Last modified 24-08-2026

Vulnerability summary

CVE-2026-41316 is a high (CVSS 8.1) Protection Mechanism Failure vulnerability in ruby erb. EPSS estimates a 1.13% chance of exploitation in the next 30 days, higher than 66.4% of scored vulnerabilities.

Priority
Prioritisesevere

Severe, CVSS 8.1 (CVE.org); no exploitation reported by the 5 checked sources; EPSS 1% (FIRST, 03-11-2026)

Source freshness unavailable

How is this decided?
CVSS score
8.1/10
010
High · v3.1 (CVE.org)
EPSS score
1.13%
0%100%
Low · -0.17 pp in 30 days
KEVNot listedNot listed by any tracked catalog.
RansomwareNot flaggedNo ransomware use recorded.
Public exploits0No public exploits recorded

Advisory lineage

Upstream 0 · Downstream 6 · Related 2

Timeline

  1. 24-04-2026
    PublishedVulnerability first disclosed.
  2. 24-08-2026
    Last modifiedVulnerability information updated.

Description

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.

CVSS metrics

9 scores · 9 sources · 1 version

EPSS trend

Probability

1.13%

Chance of exploitation in the next 30 days

Percentile

66%

Versus all other CVEs

30-day change

Decrease -0.17 pp

From 1.31% on 04-10-2026

04-10-202603-11-2026

Known exploited

Compare KEV catalogs
CISA KEV

Not in the CISA KEV catalog.

ENISA CNW

Not in the ENISA CNW catalog.

CIRCL

Not in the CIRCL catalog.

Public exploits

0 found

No public exploits indexed.

Weaknesses

CWE · root cause

Affected systems

Version check

Known conditions: network-reachable, no authentication, no user interaction (CVSS vector). Other conditions: not stated in public data.

Redhat44 products
  • ruby< 0:3.3.10-11.el10_0.1 | < 0:3.3.10-6.module+el9.7.0+24248+66578cbb | < 0:3.0.7-166.el9_7 | < 0:3.3.10-12.el10_1 | < 0:3.3.10-6.module+el8.10.0+24247+b74f0fb8 | < 0:3.0.4-160.2.el9_0 | < 0:3.0.7-162.el9_4.2 | < 0:3.3.10-6.module+el9.4.0+24333+ed4ca411
  • ruby-bundled-gems< 0:3.3.10-11.el10_0.1 | < 0:3.3.10-6.module+el9.7.0+24248+66578cbb | < 0:3.3.10-12.el10_1 | < 0:3.3.10-6.module+el8.10.0+24247+b74f0fb8 | < 0:3.3.10-6.module+el9.4.0+24333+ed4ca411
  • ruby-bundled-gems-debuginfo< 0:3.3.10-11.el10_0.1 | < 0:3.3.10-6.module+el9.7.0+24248+66578cbb | < 0:3.3.10-12.el10_1 | < 0:3.3.10-6.module+el8.10.0+24247+b74f0fb8 | < 0:3.3.10-6.module+el9.4.0+24333+ed4ca411
  • ruby-debuginfo< 0:3.3.10-11.el10_0.1 | < 0:3.3.10-6.module+el9.7.0+24248+66578cbb | < 0:3.0.7-166.el9_7 | < 0:3.3.10-12.el10_1 | < 0:3.3.10-6.module+el8.10.0+24247+b74f0fb8 | < 0:3.0.4-160.2.el9_0 | < 0:3.0.7-162.el9_4.2 | < 0:3.3.10-6.module+el9.4.0+24333+ed4ca411
  • ruby-debugsource< 0:3.3.10-11.el10_0.1 | < 0:3.3.10-6.module+el9.7.0+24248+66578cbb | < 0:3.0.7-166.el9_7 | < 0:3.3.10-12.el10_1 | < 0:3.3.10-6.module+el8.10.0+24247+b74f0fb8 | < 0:3.0.4-160.2.el9_0 | < 0:3.0.7-162.el9_4.2 | < 0:3.3.10-6.module+el9.4.0+24333+ed4ca411
Chainguard37 products
  • jruby-10.1< 10.1.1.0-r0
  • jruby-9.4< 9.4.15.0-r0
  • logstash-8.19< 8.19.19-r0
  • logstash-8.19-iamguarded-compat< 8.19.19-r0
  • logstash-8.19-with-output-opensearch< 8.19.19-r0
Wolfi13 products
  • jruby-10.1< 10.1.1.0-r0
  • jruby-9.4< 9.4.15.0-r0
  • logstash-9.3< 9.3.4-r2
  • logstash-9.3-iamguarded-compat< 9.3.4-r2
  • logstash-9.3-with-output-opensearchAll versions (No fix recorded)
Ubuntu7 products
  • jrubyAll versions (No fix recorded)
  • ruby2.3All versions (No fix recorded)
  • ruby2.5All versions (No fix recorded)
  • ruby2.7All versions (No fix recorded)
  • ruby3.0All versions (No fix recorded)
Debian2 products
  • ruby3.1All versions (No fix recorded)
  • ruby3.3All versions (No fix recorded)
Alpine1 product
  • ruby< 3.3.13-r0
Opensuse1 product
  • ruby4.0&distro=openSUSE Tumbleweed< 4.0.3-1.1
Ruby1 product
  • erb< 4.0.3.1 | = 4.0.4 | ≥ 5.0.0, < 6.0.1.1 | ≥ 6.0.2, < 6.0.4
RubyGems1 product
  • erb< 4.0.3.1 | ≥ 4.0.4, < 4.0.4.1 | ≥ 5.0.0, < 6.0.1.1 | ≥ 6.0.2, < 6.0.4
Suse1 product
  • ruby2.5&distro=SUSE Linux Enterprise Module for Basesystem 15 SP7< 2.5.9-150700.24.11.1

10 vendors · 108 products

References

37 links
Show all 37 references