Heap-use-after-free vulnerability in mruby

mruby Updated 02 Oct 2025

Summary

14/03/2023
HIGH
Yes i
High
Not published

OSV-2023-176: Heap-use-after-free in mrb_gc_mark. Affects mruby versions >= 0e51da81bb7981a5005ca22c95384056bcb87671, < 8d1192f8a28034b1931a41e8c55cd86715101d0c. Fixed in 8d1192f8a28034b1931a41e8c55cd86715101d0c. 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 MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

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-use-after-free issue that affects the garbage collector (GC) functionality of mruby.

Vulnerability Detail

The vulnerability arises due to a heap-use-after-free condition in the mrb_gc_mark function of mruby. This can lead to a crash when attempting to read from a freed memory location. The issue was discovered and reported by OSS-Fuzz, and more details can be found in their bug report (https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=56991). The severity of this vulnerability is considered high.

How To Fix

Minimum fixed version

8d1192f8a28034b1931a41e8c55cd86715101d0c

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.

Conclusion

In conclusion, the mruby package is affected by a heap-use-after-free vulnerability in the mrb_gc_mark function. It is recommended to update to a version of mruby that includes the fix for this vulnerability. For further support and assistance with 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 designed to be embedded in other applications.

A heap-use-after-free vulnerability occurs when a program attempts to access memory that has already been freed, leading to potential crashes or other unexpected behavior.

This vulnerability was discovered and reported by OSS-Fuzz, a continuous fuzzing service for open-source software.

The severity of this vulnerability is considered high.

More information about this vulnerability can be found in the OSS-Fuzz bug report: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=56991

Related vulnerabilities

Recent vulnerabilities recorded for mruby.

How To Fix

Minimum fixed version

8d1192f8a28034b1931a41e8c55cd86715101d0c

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