Vulnerability in mruby: UNKNOWN READ in mrb_bint_cmp

mruby Updated 02 Oct 2025

Summary

09/07/2022
MEDIUM
Yes i
Medium
Not published

OSV-2022-556: UNKNOWN READ in mrb_bint_cmp. Affects mruby versions >= 872020bb3d85ba4066ec19cfcad375e51fdf024b, < 960021e51989881c06c7c87b2661440c1fb2a784. Fixed in 960021e51989881c06c7c87b2661440c1fb2a784. 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 Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

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 identified in mruby is related to an UNKNOWN READ in the mrb_bint_cmp function. This function is responsible for comparing two bignum values in mruby. The vulnerability can potentially lead to crashes or undefined behavior when handling bignum comparisons.

Vulnerability Detail

The vulnerability arises due to an UNKNOWN READ operation in the mrb_bint_cmp function. This can result in crashes or undefined behavior when comparing bignum values in mruby. An attacker could potentially exploit this vulnerability to cause a denial-of-service condition or execute arbitrary code. The exact impact and potential attack vectors may vary depending on the specific usage of mruby in different applications.

How To Fix

Minimum fixed version

960021e51989881c06c7c87b2661440c1fb2a784

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 available for this vulnerability. It is recommended to apply the fix mentioned in the 'how_to_fix' section by updating the mruby package to a patched version.

Conclusion

In conclusion, the vulnerability in mruby related to an UNKNOWN READ in mrb_bint_cmp can lead to crashes or undefined behavior when comparing bignum values. It is crucial to update the mruby package to a patched version to mitigate the risk of exploitation. For further support on vulnerability remediation, you can reach out to DevNack.com.

See every vulnerability recorded for mruby →

Share this vulnerability

FAQ

mruby is a lightweight implementation of the Ruby programming language designed for embedding in other applications.

The vulnerability can lead to crashes or undefined behavior when comparing bignum values in mruby, potentially resulting in denial-of-service or arbitrary code execution.

To fix this vulnerability, update the mruby package to a version that includes the fix mentioned in the 'how_to_fix' section.

There is no specific workaround available for this vulnerability. It is recommended to apply the fix mentioned in the 'how_to_fix' section.

You can find more information about this vulnerability in the OSS-Fuzz report linked in the vulnerability details section.

Related vulnerabilities

Recent vulnerabilities recorded for mruby.

How To Fix

Minimum fixed version

960021e51989881c06c7c87b2661440c1fb2a784

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