Common Weakness Enumeration

CWE-1077

Allowed

Floating Point Comparison with Incorrect Operator

Abstraction: Variant · Status: Incomplete

The code performs a comparison such as an equality test between two float (floating point) values, but it uses comparison operators that do not account for the possibility of loss of precision.

11 vulnerabilities reference this CWE, most recent first.

GHSA-RM4W-CFGF-329J

Vulnerability from github – Published: 2026-08-20 00:35 – Updated: 2026-08-20 00:35
VLAI
Details

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.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2022-4996"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-1077"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2026-08-20T00:16:50Z",
    "severity": "MODERATE"
  },
  "details": "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.",
  "id": "GHSA-rm4w-cfgf-329j",
  "modified": "2026-08-20T00:35:11Z",
  "published": "2026-08-20T00:35:10Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2022-4996"
    },
    {
      "type": "WEB",
      "url": "https://huntr.com/bounties/5a5092df-1699-4497-a8b2-38318bce0c4e"
    },
    {
      "type": "WEB",
      "url": "https://vuldb.com/cve/CVE-2022-4996"
    },
    {
      "type": "WEB",
      "url": "https://vuldb.com/submit/877513"
    },
    {
      "type": "WEB",
      "url": "https://vuldb.com/vuln/391391"
    },
    {
      "type": "WEB",
      "url": "https://vuldb.com/vuln/391391/cti"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L",
      "type": "CVSS_V3"
    },
    {
      "score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N/E:P/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X",
      "type": "CVSS_V4"
    }
  ]
}

No mitigation information available for this CWE.

No CAPEC attack patterns related to this CWE.