Логотип exploitDog
Консоль
Логотип exploitDog

exploitDog

redhat логотип

CVE-2026-41316

Опубликовано: 24 апр. 2026
Источник: redhat
CVSS3: 8.1
EPSS Низкий

Описание

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.

A flaw was found in ERB, a templating system for Ruby. An attacker who can trigger deserialization of untrusted data in a Ruby application can bypass existing protections. This vulnerability allows for arbitrary code execution by exploiting specific public methods that evaluate template source code, which were not properly guarded against deserialization attacks.

Затронутые пакеты

ПлатформаПакетСостояниеРекомендацияРелиз
Red Hat Enterprise Linux 6rubyNot affected
Red Hat Enterprise Linux 7rubyNot affected
Red Hat Enterprise Linux 8ruby:2.5/rubyNot affected
Red Hat Hardened Imagesruby3.3Not affected
Red Hat Hardened Imagesruby3.4Not affected
Red Hat Hardened Imagesruby4.0Not affected
Red Hat OpenShift Container Platform 4rhcosAffected
Red Hat Enterprise Linux 10rubyFixedRHSA-2026:1806518.05.2026
Red Hat Enterprise Linux 10ruby4.0FixedRHSA-2026:2060626.05.2026
Red Hat Enterprise Linux 10.0 Extended Update SupportrubyFixedRHSA-2026:3347830.06.2026

Показывать по

Дополнительная информация

Статус:

Important
Дефект:
CWE-502
https://bugzilla.redhat.com/show_bug.cgi?id=2461369erb: ERB: Arbitrary code execution via deserialization bypass

EPSS

Процентиль: 63%
0.01131
Низкий

8.1 High

CVSS3

Связанные уязвимости

CVSS3: 8.1
ubuntu
3 месяца назад

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.

CVSS3: 8.1
nvd
3 месяца назад

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.

CVSS3: 8.1
debian
3 месяца назад

ERB is a templating system for Ruby. Ruby 2.7.0 (before ERB 2.2.0 was ...

rocky
2 месяца назад

Important: ruby:3.3 security update

rocky
2 месяца назад

Important: ruby security update

EPSS

Процентиль: 63%
0.01131
Низкий

8.1 High

CVSS3