Heap-double-free vulnerability in mruby

mruby Updated 02 Oct 2025

Summary

04/07/2020
HIGH
Yes i
High
Not published

OSV-2020-744: Heap-double-free in mrb_default_allocf. Affects mruby versions >= 9cdf439db52b66447b4e37c61179d54fad6c8f33, < 97319697c8f9f6ff27b32589947e1918e3015503. Fixed in 97319697c8f9f6ff27b32589947e1918e3015503. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

mruby is an open-source lightweight implementation of the Ruby programming language. It is designed to be embedded in other applications and provides a minimalistic and efficient runtime environment. The vulnerability in question is a heap-double-free issue that was discovered through OSS-Fuzz testing.

Vulnerability Detail

The vulnerability arises from a heap-double-free condition in the mrb_default_allocf function of mruby. This can lead to a crash due to the freeing of the same memory block twice. An attacker could potentially exploit this issue to execute arbitrary code or cause a denial of service. The vulnerability has been assigned a high severity level.

How To Fix

Minimum fixed version

97319697c8f9f6ff27b32589947e1918e3015503

This is the first release that contains the fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

There is no specific workaround mentioned for this vulnerability. However, as a general best practice, it is recommended to keep software and dependencies up to date to minimize the risk of known vulnerabilities.

Conclusion

The heap-double-free vulnerability in mruby can potentially lead to crashes, code execution, or denial of service. It is important to update to a version of mruby that includes the fix to mitigate this vulnerability. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for mruby →

Share this vulnerability

FAQ

mruby is a lightweight implementation of the Ruby programming language that is designed to be embedded in other applications.

The vulnerability occurs when the mrb_default_allocf function in mruby frees the same memory block twice, leading to a crash or potential code execution.

This vulnerability has been assigned a high severity level.

Yes, a fix has been implemented in commit 97319697c8f9f6ff27b32589947e1918e3015503. It is recommended to update to a version of mruby that includes this fix.

There are no specific workarounds mentioned for this vulnerability. Keeping software and dependencies up to date is generally a good practice to minimize the risk of known vulnerabilities.

Related vulnerabilities

Recent vulnerabilities recorded for mruby.

How To Fix

Minimum fixed version

97319697c8f9f6ff27b32589947e1918e3015503

This is the first release that contains the fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback