CVE-2026-41316
Last modified
CVE-2026-41316 is a high-severity vulnerability rated 8.1/10 on the CVSS scale. 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). EPSS estimates a 1.13% chance of exploitation in the next 30 days.
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.
Metrics
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
Weakness Enumeration
References
Timeline
- Published
- Last Modified
- Status
- Deferred
Frequently Asked Questions
What is CVE-2026-41316?
How severe is CVE-2026-41316?
How do I fix CVE-2026-41316?
How Strix Helps
- How Strix found a critical auth bypass in etcdStrix autonomously discovered a critical authentication bypass in etcd, later designated CVE-2026-33413.
- Autonomous PentestingAI agents that find and validate exploitable vulnerabilities like this one across your applications.
- PR ReviewsPentest every pull request so vulnerable code is caught before it ships to production.
- AI Penetration TestingHow AI-driven penetration testing continuously covers your attack surface.
Related CVEs from 2026
- CVE-2026-41310OpenTelemetry.Exporter.Zipkin is the .NET Zipkin exporter fo…5.3
- CVE-2026-41311LiquidJS is a Shopify / GitHub Pages compatible template eng…6.5
- CVE-2026-41312pypdf is a free and open-source pure-python PDF library. An …6.5
- CVE-2026-41313pypdf is a free and open-source pure-python PDF library. An …6.5
- CVE-2026-41314pypdf is a free and open-source pure-python PDF library. An …6.5
- CVE-2026-41315mdserver-web is a simple Linux panel. From 0.18.0 to 0.18.4,…9.8
- CVE-2026-41317Press, a Frappe custom app that runs Frappe Cloud, manages i…7.5
- CVE-2026-41318AnythingLLM is an application that turns pieces of content i…5.4
- CVE-2026-41319MailKit is a cross-platform mail client library built on top…5.9
- CVE-2026-4132The HTTP Headers plugin for WordPress is vulnerable to Exter…7.2
- CVE-2026-41320Frappe HR is an open-source human resources management solut…6.5
- CVE-2026-41321@astrojs/cloudflare is an SSR adapter for use with Cloudflar…2.2
Are you affected by CVE-2026-41316?
Run a free Strix scan to check your systems for this vulnerability.
Scan your code nowSource: NVD / NIST
