Home/CVE/ERB is a templating system for Ruby. Ruby 2.7.0 (before ERB 2.2.0 was published on rubygems.org) introduced an `@_init`
CVE

CVE-2026-41316

ERB is a templating system for Ruby. Ruby 2.7.0 (before ERB 2.2.0 was published on rubygems.org) introduced an `@_init`

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.

HIGH · CVSS 8.1 EPSS 0.00048
Act now
  • Public exploit or PoC is available
  • CVSS base score ≥ 7.0
Sigma rules0 YARA rules0
Look this up elsewhere - one-click external pivots
How to read a CVE - triage first, then detect and patch
This page is every public fact about CVE-2026-41316, cross-linked. Its job is to answer one question fast - does this need my attention now? - and then hand you the two things you do about it. Here is how an analyst reads it.
Triage: should I act now? Four signals, and they are not interchangeable:
CVSSseverity - how bad it is IF exploited, 0-10. A high CVSS alone is not urgency; a flaw can be a perfect 10 and never actually be attacked. EPSSprobability - a model’s estimate of the chance it is exploited in the next 30 days, 0-1. This is the “will it actually happen” signal. CISA KEVconfirmed - it is being exploited in the wild right now. The strongest signal on the page; KEV beats any score. Weaponisedavailability - public exploits / PoCs, and especially Metasploit modules rated Excellent / Great. Reliable, packaged exploit code means low-skill attackers can use it today.
How they combine: KEV, or a dependable Metasploit module, means patch now regardless of CVSS. High CVSS + low EPSS + no exploit is real but not an emergency - schedule it. Low CVSS but KEV-listed still gets patched now. The verdict above already weighed these for you; this is how it got there.
Then what - two workflows:
Detectwhen you cannot patch today, follow this CVE to the ATT&CK techniques it enables, then Build a SIEM detection (the green button) - author a rule, test it in Atomic, deploy it. That buys visibility while the patch waits. PatchAffected products / packages tell you if you are exposed; Fixed versions by distribution and Vendor advisories give the exact version that closes it.
Reading order for the panels below: verdict + badges, then Public exploits / Metasploit (is it weaponised), then ATT&CK techniques + Sigma / IDS rules (can I detect it), then Affected products / packages + Fixed versions (am I exposed, what patches it), then Threat actors / IOCs (who uses it), then Scoring & timeline / references (the evidence).

Weakness Classification

Affected Packages

1
Language-ecosystem packages (from OSV) tied to this CVE, with the version that fixes it - the dependency-level detail NVD doesn’t carry.
RubyGems erb HIGH fixed in 4.0.3.1

Public Exploits & PoCs

1
These PoC and exploit links come from public sources and are not verified to be safe or functional. Review the code before running anything, and treat unverified entries as untrusted.
📦

Fixed versions by distribution

77
The package version that resolves this CVE on each Linux distribution, from the vendor’s published security data. fixed in shows a patched version exists; open means the package is listed as affected with no fix yet.
oracle allruby open
oracle allruby-bundled-gems open
oracle allruby-default-gems open
oracle allruby-devel open
oracle allruby-libs fixed in 0:3.3.10-12.el10_1
oracle allrubygem-abrt open
oracle allrubygem-bigdecimal fixed in 0:3.1.5-12.el10_1
oracle allrubygem-bundler open
oracle allrubygem-io-console fixed in 0:0.7.1-12.el10_1
oracle allrubygem-irb open
oracle allrubygem-json open
oracle allrubygem-minitest open
oracle allrubygem-mysql2 open
oracle allrubygem-pg open
oracle allrubygem-power_assert fixed in 0:2.0.3-12.el10_1
oracle allrubygem-psych open
oracle allrubygem-racc open
oracle allrubygem-rake fixed in 0:13.1.0-12.el10_1
oracle allrubygem-rbs open
oracle allrubygem-rdoc fixed in 0:6.6.3.1-12.el10_1
oracle allrubygem-rexml fixed in 0:3.4.4-12.el10_1
oracle allrubygem-rss fixed in 0:0.3.1-12.el10_1
oracle allrubygem-test-unit fixed in 0:3.6.1-12.el10_1
oracle allrubygem-typeprof fixed in 0:0.21.9-12.el10_1
oracle allrubygems fixed in 0:3.5.22-12.el10_1
oracle allrubygems-devel fixed in 0:3.5.22-12.el10_1
rhel 8ruby open
rhel 8ruby-bundled-gems fixed in 0:3.3.10-6.module+el8.10.0+24247+b74f0fb8
rhel 8ruby-default-gems fixed in 0:3.3.10-6.module+el8.10.0+24247+b74f0fb8
rhel 8ruby-devel open
rhel 8ruby-libs open
rhel 8rubygem-abrt fixed in 0:0.4.0-1.module+el8.10.0+21226+b78a28c4
rhel 8rubygem-bigdecimal open
rhel 8rubygem-bundler fixed in 0:2.5.22-6.module+el8.10.0+24247+b74f0fb8
rhel 8rubygem-io-console open
rhel 8rubygem-irb open
rhel 8rubygem-json open
rhel 8rubygem-minitest fixed in 0:5.20.0-6.module+el8.10.0+24247+b74f0fb8
rhel 8rubygem-mysql2 fixed in 0:0.5.5-1.module+el8.10.0+21226+b78a28c4
rhel 8rubygem-pg open
rhel 8rubygem-power_assert open
rhel 8rubygem-psych fixed in 0:5.1.2-6.module+el8.10.0+24247+b74f0fb8
rhel 8rubygem-racc fixed in 0:1.7.3-6.module+el8.10.0+24247+b74f0fb8
rhel 8rubygem-rake fixed in 0:13.1.0-6.module+el8.10.0+24247+b74f0fb8
rhel 8rubygem-rbs open
rhel 8rubygem-rdoc open
rhel 8rubygem-rexml fixed in 0:3.4.4-6.module+el8.10.0+24247+b74f0fb8
rhel 8rubygem-rss open
rhel 8rubygem-test-unit open
rhel 8rubygem-typeprof fixed in 0:0.21.9-6.module+el8.10.0+24247+b74f0fb8
rhel 8rubygems fixed in 0:3.5.22-6.module+el8.10.0+24247+b74f0fb8
rhel 8rubygems-devel fixed in 0:3.5.22-6.module+el8.10.0+24247+b74f0fb8
rhel 9ruby fixed in 0:4.0.3-32.module+el9.8.0+24280+122d8796
rhel 9ruby-bundled-gems open
rhel 9ruby-default-gems fixed in 0:4.0.3-32.module+el9.8.0+24280+122d8796
rhel 9ruby-devel fixed in 0:4.0.3-32.module+el9.8.0+24280+122d8796
rhel 9ruby-libs open
rhel 9rubygem-bigdecimal fixed in 0:4.0.1-32.module+el9.8.0+24280+122d8796
rhel 9rubygem-bundler fixed in 0:4.0.6-32.module+el9.8.0+24280+122d8796
rhel 9rubygem-io-console fixed in 0:0.8.2-32.module+el9.8.0+24280+122d8796
rhel 9rubygem-irb open
rhel 9rubygem-json open
rhel 9rubygem-minitest fixed in 0:6.0.0-32.module+el9.8.0+24280+122d8796
rhel 9rubygem-mysql2 fixed in 0:0.5.7-1.module+el9.8.0+24280+122d8796
rhel 9rubygem-pg fixed in 0:1.6.3-1.module+el9.8.0+24280+122d8796
rhel 9rubygem-power_assert open
rhel 9rubygem-psych open
rhel 9rubygem-racc fixed in 0:1.8.1-32.module+el9.8.0+24280+122d8796
rhel 9rubygem-rake fixed in 0:13.3.1-32.module+el9.8.0+24280+122d8796
rhel 9rubygem-rbs open
rhel 9rubygem-rdoc fixed in 0:7.0.3-32.module+el9.8.0+24280+122d8796
rhel 9rubygem-rexml fixed in 0:3.4.4-32.module+el9.8.0+24280+122d8796
rhel 9rubygem-rss open
rhel 9rubygem-test-unit open
rhel 9rubygem-typeprof open
rhel 9rubygems fixed in 0:4.0.6-32.module+el9.8.0+24280+122d8796
rhel 9rubygems-devel open

Scoring & Timeline

8.1
HIGH · CVSS v3.1 · [email protected]
View on NVD
Attack Vector
Network Adjacent Local Physical
Attack Complexity
Low High
Privileges Required
None Low High
User Interaction
None Required
Scope
Unchanged Changed
Confidentiality
None Low High
Integrity
None Low High
Availability
None Low High
Published to NVD24 Apr 2026 · 03:16 AM
CVSS VectorCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
SSVC triage · cisa-vulnrichment
Exploitation
none
Automatable
no
Technical impact
total
SSVC asks the questions that actually drive patch urgency: is it being exploited, can attacks be automated, and how total is the impact.

Vendor Advisories

8
rhsaRHSA-2026:18030Important
rhsaRHSA-2026:18065Important
rhsaRHSA-2026:18039Important
rhsaRHSA-2026:20596Important
rhsaRHSA-2026:20670Important
🔗

References & Sources

1
Source URLs (vendor pages, mailing lists, write-ups). Exploit/PoC links are in their own section above to avoid duplication.
SOC and Response
CVE triage
Stack monitoring
Am I affected
IOC triage
KEV catalog
Daily brief
Change tracking
Detection Engineering
Coverage workspace
Detection coverage
Coverage check
Telemetry ceiling
SIEM query builder
Sigma rules
SIEM rules
YARA rules
Network rules
D3FEND
Threat Hunting
Threat actors
ATT&CK techniques
Attack paths
Indicators
Atomic tests
Red Team and Pentest
Exploitability triage
Recon pack
Attack paths
CAPEC patterns
Adversary emulation
Compliance and GRC
Framework mapping
Control assessment
Audit view
Coverage report
Atlas Search Threat actors Techniques Tools & malware CWE CAPEC KEV catalog Package vulns TAXII feed Data sources
About All capabilities Pricing API docs Live status Privacy policy Terms of service
threatengine.sh