# GHSA-9fjq-45qv-pcm7: ruint affected by unsoundness of safe `reciprocal_mg10`

- Severity: Medium (CVSS:4.0, scored by GitHub) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Published: 2025-12-22T12:00:00.000Z
- Modified: 2025-12-28T09:55:04.497Z
- Also known as: RUSTSEC-2025-0137
- Weaknesses: CWE-119

## Description

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.

(As written by GitHub Advisory Database.)

## Affected

- ruint (crates.io): up to 1.17.0; from 0.0.0-0 before 1.17.1

## References

- <https://github.com/recmo/uint/issues/550> (report, web)
- <https://github.com/recmo/uint> (package)
- <https://github.com/recmo/uint/blob/17c9b3e9062f74a39701e68dec358375595d33d7/src/algorithms/div/reciprocal.rs#L79-L87> (web)
- <https://rustsec.org/advisories/RUSTSEC-2025-0137.html> (advisory, web)
- <https://crates.io/crates/ruint> (package)

## Sources

- GitHub Advisory Database: [GHSA-9fjq-45qv-pcm7](https://github.com/advisories/GHSA-9fjq-45qv-pcm7), CC-BY-4.0, modified 2025-12-27
- RustSec Advisory Database: [RUSTSEC-2025-0137](https://rustsec.org/advisories/RUSTSEC-2025-0137.html), CC0-1.0, modified 2025-12-28

---

Page: https://cve.day/GHSA-9fjq-45qv-pcm7 · Whole record: https://cve.day/GHSA-9fjq-45qv-pcm7.json · Rebuilt by cve.day 2026-11-25T22:56:43.286Z
