CVE & CISA-KEV Catalog

CVE-2026-41316

HIGH
8.1
CVSS v3
NVD

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.

How to fix

Remediation Available
rubyAmazon
Fixed in:0:2.0.0.648-36.amzn2.0.18
Fixed in:0:2.0.0.648-36.amzn2.0.18
Fixed in:0:2.0.0.648-36.amzn2.0.18
ruby-debuginfoAmazon
Fixed in:0:2.0.0.648-36.amzn2.0.18
Fixed in:0:2.0.0.648-36.amzn2.0.18
Fixed in:0:2.0.0.648-36.amzn2.0.18
ruby-develAmazon
Fixed in:0:2.0.0.648-36.amzn2.0.18
Fixed in:0:2.0.0.648-36.amzn2.0.18
Fixed in:0:2.0.0.648-36.amzn2.0.18
ruby-docAmazon
Fixed in:0:2.0.0.648-36.amzn2.0.18
ruby-irbAmazon
Fixed in:0:2.0.0.648-36.amzn2.0.18
ruby-libsAmazon
Fixed in:0:2.0.0.648-36.amzn2.0.18
Fixed in:0:2.0.0.648-36.amzn2.0.18
Fixed in:0:2.0.0.648-36.amzn2.0.18
ruby-tcltkAmazon
Fixed in:0:2.0.0.648-36.amzn2.0.18
Fixed in:0:2.0.0.648-36.amzn2.0.18
Fixed in:0:2.0.0.648-36.amzn2.0.18
ruby3.4Amazon
Fixed in:0:3.4.8-27.amzn2023.0.5
Fixed in:0:3.4.8-27.amzn2023.0.5
ruby3.4-bundled-gemsAmazon
Fixed in:0:3.4.8-27.amzn2023.0.5
Fixed in:0:3.4.8-27.amzn2023.0.5
ruby3.4-bundled-gems-debuginfoAmazon
Fixed in:0:3.4.8-27.amzn2023.0.5
Fixed in:0:3.4.8-27.amzn2023.0.5
ruby3.4-debuginfoAmazon
Fixed in:0:3.4.8-27.amzn2023.0.5
Fixed in:0:3.4.8-27.amzn2023.0.5
ruby3.4-debugsourceAmazon
Fixed in:0:3.4.8-27.amzn2023.0.5
Fixed in:0:3.4.8-27.amzn2023.0.5
ruby3.4-default-gemsAmazon
Fixed in:0:3.4.8-27.amzn2023.0.5
ruby3.4-develAmazon
Fixed in:0:3.4.8-27.amzn2023.0.5
Fixed in:0:3.4.8-27.amzn2023.0.5
ruby3.4-docAmazon
Fixed in:0:3.4.8-27.amzn2023.0.5
ruby3.4-libsAmazon
Fixed in:0:3.4.8-27.amzn2023.0.5
Fixed in:0:3.4.8-27.amzn2023.0.5
ruby3.4-libs-debuginfoAmazon
Fixed in:0:3.4.8-27.amzn2023.0.5
Fixed in:0:3.4.8-27.amzn2023.0.5
ruby3.4-rubygem-bigdecimalAmazon
Fixed in:0:3.1.8-27.amzn2023.0.5
Fixed in:0:3.1.8-27.amzn2023.0.5
ruby3.4-rubygem-bigdecimal-debuginfoAmazon
Fixed in:0:3.1.8-27.amzn2023.0.5
Fixed in:0:3.1.8-27.amzn2023.0.5
ruby3.4-rubygem-bundlerAmazon
Fixed in:0:2.6.9-27.amzn2023.0.5
ruby3.4-rubygem-io-consoleAmazon
Fixed in:0:0.8.1-27.amzn2023.0.5
Fixed in:0:0.8.1-27.amzn2023.0.5
ruby3.4-rubygem-io-console-debuginfoAmazon
Fixed in:0:0.8.1-27.amzn2023.0.5
Fixed in:0:0.8.1-27.amzn2023.0.5
ruby3.4-rubygem-irbAmazon
Fixed in:0:1.14.3-27.amzn2023.0.5
ruby3.4-rubygem-jsonAmazon
Fixed in:0:2.9.1-27.amzn2023.0.5
Fixed in:0:2.9.1-27.amzn2023.0.5
ruby3.4-rubygem-json-debuginfoAmazon
Fixed in:0:2.9.1-27.amzn2023.0.5
Fixed in:0:2.9.1-27.amzn2023.0.5
ruby3.4-rubygem-minitestAmazon
Fixed in:0:5.25.4-27.amzn2023.0.5
ruby3.4-rubygem-power_assertAmazon
Fixed in:0:2.0.5-27.amzn2023.0.5
ruby3.4-rubygem-psychAmazon
Fixed in:0:5.2.2-27.amzn2023.0.5
Fixed in:0:5.2.2-27.amzn2023.0.5
ruby3.4-rubygem-psych-debuginfoAmazon
Fixed in:0:5.2.2-27.amzn2023.0.5
Fixed in:0:5.2.2-27.amzn2023.0.5
ruby3.4-rubygem-raccAmazon
Fixed in:0:1.8.1-27.amzn2023.0.5
Fixed in:0:1.8.1-27.amzn2023.0.5

This vulnerability affects an unusually large number of packages. The highest-confidence fixes are shown above; the full list is longer. Check the referenced advisories for complete coverage.

TridentStack Control can deploy fixes like this automatically across your Windows, macOS, and Linux fleet. See how it works

Remediation is compiled from vendor and distribution security advisories. Always confirm against the linked source for your exact version and platform.

CVSS v3 Vector

Exploitability

Attack VectorNetwork
Attack ComplexityHigh
Privileges RequiredNone
User InteractionNone
ScopeUnchanged

Impact

ConfidentialityHigh
IntegrityHigh
AvailabilityHigh

CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H

Exploit Intelligence

1.13%probability of exploitation in 30 days
65thpercentile

Moderate risk: more likely to be exploited than 65% of all known CVEs.

References

Related Vulnerabilities

Other CWE-693 (Protection Mechanism Failure) vulnerabilities, ordered by exploit likelihood. View all

CVESeverityCVSSEPSSExploitedFix
CVE-2013-2465Critical9.899%KEV + Ransom-
CVE-2019-1003030Critical9.997%KEV-
CVE-2024-21412High8.195%KEV + RansomFix
CVE-2013-0431Medium5.390%KEV + Ransom-
CVE-2025-40536High8.182%KEVFix
CVE-2025-0411High7.067%KEVFix

Common questions

How do I fix CVE-2026-41316?

Published advisories record a fix for 156 affected products. The "How to fix" section on this page lists the fixed version and source advisory for each one, so apply the entry matching what you actually run.

Is CVE-2026-41316 being actively exploited?

Not that we know of. CVE-2026-41316 is not in the CISA Known Exploited Vulnerabilities catalog. Its EPSS score of 1.1% is the estimated probability that it will be exploited in the next 30 days. That is higher than 65% of all scored CVEs.

How severe is CVE-2026-41316?

CVE-2026-41316 has a CVSS v3 base score of 8.1, rated high. CVSS rates the technical impact if the vulnerability is exploited, not how likely that is, so weigh it alongside the exploit-prediction score when you decide what to patch first.

What does CVE-2026-41316 affect?

Published advisories record a fix for ruby (Amazon), ruby-debuginfo (Amazon), ruby-devel (Amazon), ruby-doc (Amazon), and 152 more. Only products with a sourced advisory are listed, so treat this as what we can cite rather than a complete inventory.

Embed a live status badge for CVE-2026-41316
CVE-2026-41316 severity badge

Markdown

[![CVE-2026-41316](https://tridentstack.com/cve/badge/CVE-2026-41316.svg)](https://tridentstack.com/cve/CVE-2026-41316)

HTML

<a href="https://tridentstack.com/cve/CVE-2026-41316"><img src="https://tridentstack.com/cve/badge/CVE-2026-41316.svg" alt="CVE-2026-41316"></a>

Check your Linux endpoints for this class of vulnerability

TridentStack Control continuously scans Linux endpoints for known vulnerabilities and deploys the fixes from the same console. 200 endpoints free forever, no credit card.

Patch your fleet freeStart freeThis CVE lookup is free and always will be.

This product uses NVD data but is not endorsed or certified by the NVD. EPSS scores courtesy of FIRST.org (https://www.first.org/epss). Source: CISA KEV Catalog. Data as of 2026-08-24.