CVE-2026-1979

5.3 MEDIUM

📋 TL;DR

A use-after-free vulnerability in mruby up to version 3.4.0 allows local attackers to execute arbitrary code or cause denial of service. This affects the JMPNOT-to-JMPIF optimization in the virtual machine component. Systems running vulnerable mruby versions are at risk.

💻 Affected Systems

Products:
  • mruby
Versions: All versions up to and including 3.4.0
Operating Systems: All operating systems running mruby
Default Config Vulnerable: ⚠️ Yes
Notes: Any application or system using mruby up to version 3.4.0 is vulnerable. The vulnerability is in the core mruby virtual machine.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Local privilege escalation leading to full system compromise, arbitrary code execution, or persistent backdoor installation.

🟠

Likely Case

Local denial of service, application crashes, or limited privilege escalation within the mruby context.

🟢

If Mitigated

Minimal impact if proper sandboxing and privilege separation are implemented, with only local user access required.

🌐 Internet-Facing: LOW - Attack requires local access, not remotely exploitable.
🏢 Internal Only: MEDIUM - Local attackers could exploit this to escalate privileges or disrupt services on affected systems.

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: LIKELY
Unauthenticated Exploit: ✅ No
Complexity: MEDIUM

Exploit requires local access and manipulation of mruby bytecode. The vulnerability is in the JMPNOT-to-JMPIF optimization logic.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Versions after commit e50f15c1c6e131fa7934355eb02b8173b13df415

Vendor Advisory: https://github.com/mruby/mruby/issues/6701

Restart Required: Yes

Instructions:

1. Update mruby to a version containing commit e50f15c1c6e131fa7934355eb02b8173b13df415
2. Rebuild any applications using mruby
3. Restart affected services

🔧 Temporary Workarounds

Disable JMP optimization

all

Modify mruby build configuration to disable JMPNOT-to-JMPIF optimization

Modify build_config.rb to remove -DMRB_OPT_JMP_OPTIMIZATION flag

🧯 If You Can't Patch

  • Implement strict privilege separation and sandboxing for mruby processes
  • Restrict local user access to systems running vulnerable mruby versions

🔍 How to Verify

Check if Vulnerable:

Check mruby version with 'mruby --version' or examine source code for commit e50f15c1c6e131fa7934355eb02b8173b13df415

Check Version:

mruby --version

Verify Fix Applied:

Verify mruby version is newer than 3.4.0 or contains the fix commit

📡 Detection & Monitoring

Log Indicators:

  • Segmentation faults in mruby processes
  • Unexpected process termination
  • Memory access violation errors

Network Indicators:

  • None - local exploitation only

SIEM Query:

Process:Name="mruby" AND EventID=1000 OR EventID=1001 (Windows) OR Process:Name="mruby" AND Signal=11 (Linux)

🔗 References

📤 Share & Export