CVE Vulnerabilities

CVE-2026-41316

Protection Mechanism Failure

Published: Apr 24, 2026 | Modified: Apr 29, 2026
CVSS 3.x
N/A
Source:
NVD
CVSS 2.x
RedHat/V2
RedHat/V3
8.1 IMPORTANT
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
Ubuntu
MEDIUM
root.io logo minimus.io logo echo.ai logo

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.

Weakness

The product does not use or incorrectly uses a protection mechanism that provides sufficient defense against directed attacks against the product.

Affected Software

NameVendorStart VersionEnd Version
Red Hat Enterprise Linux 10RedHatruby-0:3.3.10-12.el10_1*
Red Hat Enterprise Linux 10RedHatruby4.0-0:4.0.3-34.el10_2*
Red Hat Enterprise Linux 8RedHatruby:3.3-8100020260428163940.489197e6*
Red Hat Enterprise Linux 9RedHatruby:3.3-9070020260428163621.9*
Red Hat Enterprise Linux 9RedHatruby-0:3.0.7-166.el9_7*
Red Hat Enterprise Linux 9RedHatruby:4.0-9080020260513131334.9*
Red Hat Enterprise Linux 9.0 Update Services for SAP SolutionsRedHatruby-0:3.0.4-160.2.el9_0*
Red Hat Enterprise Linux 9.4 Update Services for SAP SolutionsRedHatruby-0:3.0.7-162.el9_4.2*
Red Hat Enterprise Linux 9.4 Update Services for SAP SolutionsRedHatruby:3.3-9040020260520083544.9*
JrubyUbuntuesm-apps/xenial*
Ruby2.3Ubuntuesm-infra/xenial*

References