Skip to content

Commit ac9ab6c

Browse files
jasnowRubySec CI
authored andcommitted
Updated advisory posts against rubysec/ruby-advisory-db@851dcb1
1 parent 8d4f58c commit ac9ab6c

1 file changed

Lines changed: 41 additions & 0 deletions

File tree

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
---
2+
layout: advisory
3+
title: 'CVE-2026-41316 (erb): ERB has an @_init deserialization guard bypass via def_module
4+
/ def_method / def_class'
5+
comments: false
6+
categories:
7+
- erb
8+
advisory:
9+
gem: erb
10+
cve: 2026-41316
11+
ghsa: q339-8rmv-2mhv
12+
url: https://nvd.nist.gov/vuln/detail/CVE-2026-41316
13+
title: ERB has an @_init deserialization guard bypass via def_module / def_method
14+
/ def_class
15+
date: 2026-04-13
16+
description: |-
17+
ERB implements an @_init guard to prevent code execution when ERB
18+
objects are reconstructed via Marshal.load on untrusted data. However,
19+
ERB#def_method, ERB#def_module, and ERB#def_class evaluate the template
20+
source without checking this guard, allowing an attacker who controls
21+
the data passed to Marshal.load to bypass the protection and execute
22+
arbitrary code. In particular, def_module takes no arguments, making
23+
it straightforward to invoke as part of a deserialization gadget chain.
24+
25+
Please update the erb gem to version 4.0.3.1, 4.0.4.1, 6.0.1.1,
26+
6.0.4 or later.
27+
cvss_v3: 8.1
28+
patched_versions:
29+
- "~> 4.0.3.1"
30+
- "~> 4.0.4.1"
31+
- "~> 6.0.1.1"
32+
- ">= 6.0.4"
33+
related:
34+
url:
35+
- https://nvd.nist.gov/vuln/detail/CVE-2026-41316
36+
- https://www.ruby-lang.org/en/news/2026/04/21/ruby-4-0-3-released
37+
- https://www.ruby-lang.org/en/news/2026/04/21/erb-cve-2026-41316
38+
- https://github.com/ruby/erb/blob/master/NEWS.md
39+
- https://github.com/ruby/erb/commit/9d017be4e375cdd058650ce528ee6adfead20cac
40+
- https://github.com/advisories/GHSA-q339-8rmv-2mhv
41+
---

0 commit comments

Comments
 (0)