CVE-2026-41316
No exploitation reported by the sources we read.
- Published2026-04-24
- Fixed in6.0.4 · 6.0.1.1 · 4.0.4.1 · 4.0.3.1
- WeaknessCWE-502 · CWE-693
Am I affected?
Debian, Ubuntu or Red Hat sometimes backport a fix without changing the upstream version number: such a version reads « to verify », never « affected ».With a domain, we read the version its public headers and pages expose. A distribution build can carry the fix under an older number.
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.
Timeline
dates in UTC- 2026-04-2403:16CVE publishedNVD
Observed activity
isMalicious corpus · updated 2026-10-23 21:37 UTCBlock these indicators
- Firewall list (EDL, text): https://api.ismalicious.com/edl/cve/CVE-2026-41316?format=txt
- CSV export: https://api.ismalicious.com/edl/cve/CVE-2026-41316?format=csv
- TAXII collection of exploited CVEs
- The EDL and CSV take an API key on the Pro plan.
Versions per branch
OSV| Branch | Affected | Fixed in | Source |
|---|---|---|---|
| 6.0 | ≥ 6.0.2, < 6.0.4 | 6.0.4 | OSV |
| 6.0 | ≥ 5.0.0, < 6.0.1.1 | 6.0.1.1 | OSV |
| 4.0 | ≥ 4.0.4, < 4.0.4.1 | 4.0.4.1 | OSV |
| 4.0 | < 4.0.3.1 | 4.0.3.1 | OSV |
as publishedRanges as NVD and OSV publish them; a distribution’s build can be fixed under an older number.
Distribution builds and vendor advisories
Packages from OSV.dev and products from the vendors' CSAF advisories.
version not verifiedVersions not verified: read as OSV.dev and the vendors publish them, not checked against each vendor's release list.
Packages
- rubyAlmaLinux:9all versions · fixed in 3.0.7-166.el9_7and 4 other packages
- rubyAlmaLinux:9all versions · fixed in 3.3.10-6.module_el9.7.0+245+447713a2and 5 other packages
- rubyAlmaLinux:9all versions · fixed in 4.0.3-32.module_el9.8.0+251+5fdbd96band 5 other packages
- rubyAlmaLinux:8all versions · fixed in 3.3.10-6.module_el8.10.0+4183+69a3c42fand 5 other packages
- ruby-docAlmaLinux:10all versions · fixed in 3.3.10-12.el10_1and 1 other package
- ruby4.0AlmaLinux:10all versions · fixed in 4.0.3-34.el10_2and 2 other packages
- ruby4.0-rubygem-mysql2AlmaLinux:10all versions · fixed in 0.5.7-34.el10_2
- ruby4.0-rubygem-pgAlmaLinux:10all versions · fixed in 1.6.3-34.el10_2
84 more package ranges on OSV.dev
Fix
- Update erb to 6.0.4 · 6.0.1.1 · 4.0.4.1 · 4.0.3.1
Detection
- Nuclei template
- none so far ProjectDiscovery
- Exploit-DB
- no entry Exploit-DB
- Proof-of-concept repositories
- none listed PoC-in-GitHub
Sources
Technical details
- CVSS v3 Vector
- CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
- Published
- 2026-04-24
- Last Modified
- 2026-08-24
- NVD status
- Deferred
Frequently asked questions
What is CVE-2026-41316?
Is CVE-2026-41316 actively exploited?
What is the CVSS score for CVE-2026-41316?
Running erb? Hear about its next vulnerability
Surveillance reads the versions in your stack — a domain, a lockfile or a list — checks each CVE against the ranges its sources publish, and alerts you when one you run is exploited or enters CISA KEV. A version it cannot read stays « version not verified ».
No credit card required · No monthly cap on website lookups · 250 API requests/month
Go further
- Following what attackers exploit right now? The CISA KEV additions of the month, with their patch deadlines.
- Running this software? Vulnerability monitoring alerts you to new vulnerabilities in your products.
Related vulnerabilities
Same product first, then the same vendor advisory and the same publication week.