Skip to content

Commit 851dcb1

Browse files
jasnowhuda-kh
andauthored
My requested changes to PR #1039 (#1081)
* Add CVE-2026-41316 * Updated both advisory to normal conventions * Update CVE-2026-41316 date to 2026-04-13 --------- Co-authored-by: Huda <huda@haesemathematics.com.au>
1 parent 0322b5e commit 851dcb1

2 files changed

Lines changed: 63 additions & 0 deletions

File tree

gems/erb/CVE-2026-41316.yml

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

rubies/ruby/CVE-2026-41316.yml

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

0 commit comments

Comments
 (0)