GHSA-9fjq-45qv-pcm7: Ruint Ruint Affected By Unsoundness Of Vulnerability

MODERATE
CWE-119
Published
Advisory Summary

GHSA-9fjq-45qv-pcm7 is a MODERATE ruint affected by unsoundness of vulnerability (CWE-119: Improper Restriction of Operations within the Bounds of a Memory Buffer) affecting Ruint libraries in the crates.io ecosystem. The issue involves ruint affected by unsoundness of safe `reciprocal_mg10`. Remediation is available in the latest vendor maintenance releases.

GHSA-9fjq-45qv-pcm7 at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-9fjq-45qv-pcm7
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-119: Improper Restriction of Operations within the Bounds of a Memory Buffer
Affected Product Ruint
Package Ecosystem crates.io
Published Date
Last Updated

How to Fix GHSA-9fjq-45qv-pcm7

To remediate this vulnerability, upgrade all affected Ruint dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

ruint fixed: Latest secure release
Upgrade ruint to Latest secure release
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for ruint

How to Check if You Are Affected

To determine whether your application is affected by GHSA-9fjq-45qv-pcm7, inspect your project dependencies for Ruint:

inspect dependencies for ruint

Analyze the terminal output to locate any version of Ruint in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-119: Improper Restriction of Operations within the Bounds of a Memory Buffer, where the product performs operations on a memory buffer, but it reads from or writes to a memory location outside the buffer's intended boundary. this may result in read or write operations on unexpected memory locations that could be linked to other variables, data structures, or internal program data. In Ruint, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

The function `reciprocal_mg10` is marked as safe but can trigger undefined behavior (out-of-bounds access) because it relies on `debug_assert!` for safety checks instead of `assert!`. When compiled in release mode, the `debug_assert!` is optimized out, potentially allowing invalid inputs to cause memory corruption.

GHSA-9fjq-45qv-pcm7 Affected Ruint Versions

1 component(s)
Product / Package Ecosystem Affected Versions Fixed Version
ruint
crates.io
≤ 1.17.0

References

Frequently Asked Questions

What is GHSA-9fjq-45qv-pcm7?
GHSA-9fjq-45qv-pcm7 is a security vulnerability in Ruint involving ruint affected by unsoundness of safe `reciprocal_mg10` under CWE-119: Improper Restriction of Operations within the Bounds of a Memory Buffer.
Which Ruint versions are affected?
Affected versions include releases prior to current release patches across affected packages: ruint.
What version fixes GHSA-9fjq-45qv-pcm7?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is ruint affected?
Yes, ruint is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What CWE is associated with GHSA-9fjq-45qv-pcm7?
GHSA-9fjq-45qv-pcm7 is classified under CWE-119: Improper Restriction of Operations within the Bounds of a Memory Buffer (The product performs operations on a memory buffer, but it reads from or writes to a memory location outside the buffer's intended boundary. This may result in read or write operations on unexpected memory locations that could be linked to other variables, data structures, or internal program data.).
How can I check crates.io dependencies for GHSA-9fjq-45qv-pcm7?
Run the dependency tree command: 'inspect dependencies for ruint'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-9fjq-45qv-pcm7",
  "modified" : "2025-12-26T18:55:53Z",
  "published" : "2025-12-26T18:55:53Z",
  "aliases" : [ ],
  "summary" : "ruint affected by unsoundness of safe `reciprocal_mg10`",
  "details" : "The function `reciprocal_mg10` is marked as safe but can trigger undefined behavior (out-of-bounds access) because it relies on `debug_assert!` for safety checks instead of `assert!`.\n\nWhen compiled in release mode, the `debug_assert!` is optimized out, potentially allowing invalid inputs to cause memory corruption.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/E:U"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "crates.io",
      "name" : "ruint"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "1.17.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/recmo/uint/issues/550"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/recmo/uint"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/recmo/uint/blob/17c9b3e9062f74a39701e68dec358375595d33d7/src/algorithms/div/reciprocal.rs#L79-L87"
  }, {
    "type" : "WEB",
    "url" : "https://rustsec.org/advisories/RUSTSEC-2025-0137.html"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-119" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-12-26T18:55:53Z",
    "nvd_published_at" : null
  }
}