# CVE-2022-4996: mruby floating point comparison flaw in bigint division

Source: https://junglewise.ai/threats/cve-2022-4996-mruby-floating-point-comparison-flaw-in-bigint-division  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-08-20. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

CVE-2022-4996 · Severity: medium · CVSS 5.3 · Published 2026-08-20

mruby is a lightweight Ruby interpreter used in embedded systems and applications. A flaw in the bigint division function can be remotely exploited to cause incorrect floating point comparisons, potentially leading to logic errors or application crashes that impact availability or data integrity.

Technologies: [Mruby](https://junglewise.ai/threats/technologies/mruby). Vendors: [Mruby](https://junglewise.ai/threats/vendors/mruby).

## Quick answers

**Is CVE-2022-4996 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2022-4996 being exploited in the wild.

**How severe is CVE-2022-4996?** Medium severity, with a CVSS score of 5.3, published 20 August 2026.

**Which products and versions are affected?** Mruby 3.1.0.

**Is there a fix for CVE-2022-4996?** No fixed version is recorded yet. Check the vendor's advisory in the references below. If you run it, Junglewise drafts a mitigation that fits your setup and applies it once you approve, with senior security engineers behind it.

**How is CVE-2022-4996 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2022-4996?** Check whether you run Mruby at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## Technical details

The vulnerability is a floating point comparison logic error in the udiv function of bigint.c in mruby 3.1.0. The flaw stems from incorrect operator use when comparing floating point values during big integer division operations. The vulnerability is remotely exploitable with no authentication or user interaction required. An attacker can manipulate division operations to trigger incorrect comparisons, potentially causing incorrect calculation results or application instability. A patch is available and should be applied.

## Affected products

- mruby mruby 3.1.0

## Timeline

- 2026-08-20: disclosed

## References

- [https://huntr.com/bounties/5a5092df-1699-4497-a8b2-38318bce0c4e](https://huntr.com/bounties/5a5092df-1699-4497-a8b2-38318bce0c4e)
- [https://vuldb.com/cve/CVE-2022-4996](https://vuldb.com/cve/CVE-2022-4996)

## Related threats

- [mruby NULL pointer dereference in Prism parser](https://junglewise.ai/threats/cve-2026-79590-mruby-null-pointer-dereference-in-prism-parser)
- [A vulnerability has been found in mruby up to 3.4.0. This vulnerability affects the function sort_cmp of the file…](https://junglewise.ai/threats/cve-2025-13120-a-vulnerability-has-been-found-in-mruby-up-to-3-4-0-this)
- [A weakness has been identified in mruby 3.4.0. This vulnerability affects the function ary_fill_exec of the file…](https://junglewise.ai/threats/cve-2025-12875-a-weakness-has-been-identified-in-mruby-3-4-0-this-vulnerability)
