CVE-2022-1106CWE-416

use after free in mrb_vm_exec in mruby/mruby

High · published March 27, 2022

CVSS v3.0
7.2
EPSS
1%
Percentile
61.6
In the wild
Unconfirmed
What it is

⚡ A shocking 'use after free' bug lurks in the shadows of mruby's VM execution! Imagine a librarian losing track of a returned book — that’s how this vulnerability operates! 📚 It's like a restaurant trying to serve a dish using ingredients that were already thrown out — they think they're operating with a full pantry, but they're actually mixing in expired items. This 'use after free' vulnerability means the application may behave unpredictably, exposing sensitive data or crashing entirely. An attacker could exploit this weakness to cause a denial of service or even execute arbitrary code in the context of the application. This could lead to unauthorized operations or significant data loss, which is absolutely devastating for any project relying on mruby.

Put simply

It's like a restaurant trying to serve a dish using ingredients that were already thrown out — they think they're operating with a full pantry, but they're actually mixing in expired items. This 'use after free' vulnerability means the application may behave unpredictably, exposing sensitive data or crashing entirely. This vulnerability allows the mruby virtual machine to execute commands after it has freed memory, potentially leading to undefined behavior or control over the execution flow. Specifically, it resides in the mrb_vm_exec function, which handles the execution of code in mruby.

What to do

An attacker could exploit this weakness to cause a denial of service or even execute arbitrary code in the context of the application. This could lead to unauthorized operations or significant data loss, which is absolutely devastating for any project relying on mruby. Developers should upgrade to mruby version 3.2 or later immediately to eliminate this vulnerability. Additionally, conduct a review of impacted components to ensure no other vulnerabilities are lurking within, and consider implementing memory management best practices in your code. You can tackle this! Update your mruby version to 3.2 and keep your code safe from this vulnerability! 🛡️

The record
Technical detail
CVSS v3.0
7.2 · HIGH
Vector
CVSS:3.0/AV:L/AC:H/PR:H/UI:R/S:C/C:H/I:H/A:H
CVSS v4.0
Not supplied
EPSS
0.00971 · 61.6th percentile
Weakness
CWE-416 · Use After Free
Published
2022-03-27T14:05Z
EPSS history
Timeline
  • 27 MAR 14:05Z
    use after free in mrb_vm_exec in mruby/mruby
    cvelistv5