BreachSpiderVerified, not vibes

CVE-2026-41316 in Marshal products

High 8.1

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 al...

Affects 0 products from 3 vendors. Facts below cite their sources.

CVSS 3.18.1
EPSS1.7%
EPSS percentile78th
FixUnknown

Remotely exploitable over the network, high complexity, no authentication required, no user interaction needed, impact contained to the vulnerable component, full confidentiality impact, full integrity impact, full availability impact.

Affected products and versions

VendorProductAffected versions
Marshal — —
Rubygems — —
Three — —

A product listed here is affected only at the versions shown. Use the free check to test the exact version you run.

Fix and vendor advisory

No official vendor advisory link on record. See the CVE record.

Exploitation

CISA known-exploitedNot in the CISA KEV catalog
Public exploitNot confirmed

Official 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.

Source: NIST NVD / MITRE CVE.

Record details

CVE IDCVE-2026-41316
BreachSpider IDBS-2026-GLOBAL-152493-H
CVSS vectorCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
Published2026-04-24
Last modified2026-10-26
Weakness (CWE)
SourceNVD

Weakness definitions

CWE-502: Deserialization of Untrusted Data

Software deserializes untrusted data without validation, allowing crafted objects to execute arbitrary code.

CWE-693: CWE-693

Related attack patterns (CAPEC)

CAPEC-51 Poison Web Service Registry via CWE-693

CAPEC-57 Utilizing REST's Trust in the System Resource to Obtain Sensitive Data via CWE-693

CAPEC-59 Session Credential Falsification through Prediction via CWE-693

CAPEC-65 Sniff Application Code via CWE-693

CAPEC-107 Cross Site Tracing via CWE-693

Show all 18

CAPEC-127 Directory Indexing via CWE-693

CAPEC-237 Escaping a Sandbox by Calling Code in Another Language via CWE-693

CAPEC-477 Signature Spoofing by Mixing Signed and Unsigned Content via CWE-693

CAPEC-1 Accessing Functionality Not Properly Constrained by ACLs via CWE-693

CAPEC-17 Using Malicious Files via CWE-693

CAPEC-20 Encryption Brute Forcing via CWE-693

CAPEC-36 Using Unpublished Interfaces or Functionality via CWE-693

CAPEC-87 Forceful Browsing via CWE-693

CAPEC-480 Escaping Virtualization via CWE-693

CAPEC-668 Key Negotiation of Bluetooth Attack (KNOB) via CWE-693

CAPEC-22 Exploiting Trust in Client via CWE-693

CAPEC-74 Manipulating State via CWE-693

CAPEC-586 Object Injection via CWE-502

Mapping is CWE to CAPEC per MITRE CAPEC 3.9.

Analysis AI-written, not human-reviewed

CVE-2026-41316 affects Ruby's ERB templating system, specifically versions prior to ERB 2.2.0, where certain methods do not have the necessary guard against code execution during deserialization.

An attacker can exploit this vulnerability by crafting a malicious payload that, when deserialized, executes arbitrary code due to the lack of an `@_init` guard in methods `ERB#def_method` and `ERB#run`.

Questions

What is CVE-2026-41316?

CVE-2026-41316 affects Ruby's ERB templating system, specifically versions prior to ERB 2.2.0, where certain methods do not have the necessary guard against code execution during deserialization.

What is the CVSS score for CVE-2026-41316?

CVE-2026-41316 has CVSS 8.1 (High). Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H. EPSS: 1.7%.

Is CVE-2026-41316 actively exploited?

No confirmed active exploitation of CVE-2026-41316 as of 2026-11-03.

How do I remediate CVE-2026-41316?

Priority: HIGH.

What systems are affected by CVE-2026-41316?

CVE-2026-41316 affects Marshal; Rubygems; Three.

For developers and AI agents

Run this check from your own code or agent

REST API

curl -s https://breachspider.com/api/v1/assets/correlate-cves \
 -H "Authorization: Bearer $BREACHSPIDER_API_KEY" \
 -H "Content-Type: application/json" \
 -d '{"assets":[{"asset_id":"dev-1","vendor":"Marshal","product":"EDS-518A","version":"1.0"}]}'

API reference

Python SDK

pip install breachspider

PyPI · GitHub

MCP for AI agents

# hosted: add as a connector
https://mcp.breachspider.com/mcp
# local
pipx install breachspider-mcp

Setup for Claude, ChatGPT, Cursor

Free trial: 14 days, 750 device checks, no card.

Page facts from NVD, MITRE, CISA and vendor advisories, record last modified 2026-10-26.