Skip to main content
CVE-2026-41316VulnerabilityPublished Updated

Jruby: Ruby 2.7.0 (before ERB 2.2.0 was published on rubygems.org) introduced an @_init instance variable guard in

Affects jrubySource GCVE Database

0
Compare
Authoritative record:CVE-2026-41316· High 8.1

Not known to be exploited · CVSS 8.1 High · fixed in 4.0.3.1 : patch jruby soon.

Data as of 6 Nov 2026, 15:38 UTC

CVSS 3.1 base score
8.1High
How severe the flaw is on the 0–10 CVSS scale.
Patch
Available – fixed in 4.0.3.1
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 24 Apr 2026

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponized: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq Mirage: no evidence on record.

    No attack traffic recorded by OffSeq Mirage sensors

A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 6 Nov 2026.

What to do

Affected software

ProductAffectedFixed in
Ubuntu 26.10jrubypkg:deb/ubuntu/jruby?arch=source&distro=stonkingOther threatsAffected
  • =9.4.8.0+ds-3ubuntu1
  • =9.4.14.0+ds-1
Fixed in–
Ubuntu 26.10ruby3.3pkg:deb/ubuntu/ruby3.3?arch=source&distro=stonkingOther threatsAffected
  • =3.3.8-2ubuntu3
  • =3.3.8-2.2ubuntu4
Fixed in–
Ubuntu 26.04 LTSjrubypkg:deb/ubuntu/jruby?arch=source&distro=resoluteOther threatsAffected
  • =9.4.8.0+ds-3ubuntu1
Fixed in–
Ubuntu 26.04 LTSruby3.3pkg:deb/ubuntu/ruby3.3?arch=source&distro=resoluteOther threatsAffected
  • =3.3.8-2ubuntu2
  • =3.3.8-2ubuntu3
  • =3.3.8-2ubuntu3.1
Fixed in–
Ubuntu 25.10jrubypkg:deb/ubuntu/jruby?arch=source&distro=questingOther threatsAffected
  • =9.4.8.0+ds-2ubuntu1
  • =9.4.8.0+ds-3ubuntu1
Fixed in–
Ubuntu 25.10ruby3.3pkg:deb/ubuntu/ruby3.3?arch=source&distro=questingOther threatsAffected
  • 3.3.7-1ubuntu2 – 3.3.8-2ubuntu2.1
4 affected builds
Fixed in–

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

AI-suggested

Apply the official patches by upgrading to ERB versions 4.0.3.1, 4.0.4.1, 6.0.1.1, or 6.0.4 where this vulnerability is fixed. Until patched, avoid deserializing untrusted data with Marshal.load in Ruby applications that load ERB.

Description

A vulnerability in the ERB templating system for Ruby allows code execution via certain methods that evaluate unguarded code during deserialization. Ruby 2.7.0 introduced a guard to prevent code execution when an ERB object is reconstructed via Marshal.load, but this guard does not apply to the ERB methods def_method, def_module, and def_class. An attacker able to trigger Marshal.load on untrusted data can exploit ERB#def_module to execute arbitrary code, bypassing the @_init guard. The issue is patched in ERB versions 4.0.3.1, 4.0.4.1, 6.0.1.1, and 6.0.4.

References

Community reviews

Loading reviews…