Sceawere

Vulnerability Detail

CVE-2022-4996UPDATED Verified Sceawere Triage Sources: NVD / CISA KEV

mruby bigint.c udiv Floating Point Comparison Vulnerability

Vulnerability Metadata

Severity
Medium
Score / CVSS
5.3
Creation Date
17h ago
Vendor
n/a
Product
mruby
Attack Type
Floating Point Comparison with Incorrect Operator
Vector String
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
Attack Complexity
LOW

Narrative and Response

Description

A flaw has been found in mruby 3.1.0. Affected is the function udiv of the file bigint.c. Executing a manipulation can lead to floating point comparison with incorrect operator. It is possible to launch the attack remotely. The exploit has been published and may be used. It is best practice to apply a patch to resolve this issue.

Executive Summary

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Executive Summary Locked

Sign up to unlock professional threat analysis, mitigations, and indicator signatures.

Technical Details

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Detailed Technical Analysis Locked

Sign up to unlock professional threat analysis, mitigations, and indicator signatures.

Mitigations

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Remediation & Mitigations Locked

Sign up to unlock professional threat analysis, mitigations, and indicator signatures.

References

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Intelligence References Locked

Sign up to unlock professional threat analysis, mitigations, and indicator signatures.

Additional Metadata

{
  "score": "5.3",
  "pubDate": "2026-08-20T00:16:50.980Z",
  "pubdate": "2026-08-20T00:16:50.980Z",
  "executiveSummary": "A vulnerability has been identified in mruby version 3.1.0, specifically residing within the udiv function located in the bigint.c source file.\nThe flaw stems from an incorrect operator utilized during floating-point comparisons, which can be manipulated by an adversary.\nThe impact of this vulnerability includes potential application instability, incorrect arithmetic evaluations, and undefined behavior depending on how the comparison result dictates execution flow.\nThe affected product is mruby 3.1.0, with the vulnerable component being the arbitrary-precision integer implementation in bigint.c.\nAttackers can leverage this flaw remotely, as public exploit material has been released, increasing the risk of active exploitation against vulnerable deployments.\nNo specific authentication or high-privilege requirements are detailed, suggesting that remote execution of the manipulation can be achieved if untrusted input reaches the affected udiv function.\nOrganizations utilizing the affected mruby version face elevated risk due to the availability of a public exploit, making remediation a high priority.",
  "technicalDetails": "The vulnerability resides in the udiv function within the bigint.c file of mruby 3.1.0, which is responsible for handling unsigned division operations for large integers.\nThe root cause of the issue is the utilization of an incorrect operator in a floating-point comparison expression within the mathematical logic of the division routine.\nBecause the comparison logic evaluates floating-point values incorrectly, the internal state validation or quotient estimation within udiv can diverge from expected mathematical bounds.\nThe attack flow begins when an external entity provides maliciously crafted inputs or triggers specific numerical operations that invoke the vulnerable udiv function remotely.\nUpon processing the input, the execution reaches the flawed floating-point comparison inside bigint.c, where the incorrect operator evaluates conditions improperly.\nThis flawed evaluation can lead to downstream memory corruption, infinite loops, incorrect arithmetic results, or other forms of undefined program behavior.\nNetwork exposure is present if the mruby interpreter processes untrusted remote inputs or scripts that execute the affected bigint division routines.\nPrivilege and authentication requirements are minimal or absent depending on the specific application architecture exposing the mruby execution environment to remote users.\nThe payload behavior relies on supplying specific numerical parameters designed to weaponize the flawed comparison, ultimately destabilizing the runtime environment."
}
CVE-2022-4996: mruby bigint.c udiv Floating Point Comparison Vulnerability (MEDIUM Severity, CVSS: 5.3) - Sceawere