Intel

AIKIDO-2026-991372

ruint is vulnerable to Denial of Service (DoS)

Denial of Service (DoS) Pre-CVE
Found by Aikido Intel before public disclosure or CVE publication.
Published 3 days ago

62

Medium Risk

This Affects:

RUSTruint
0.1.0 - 1.19.0
Fixed in 1.20.0
Are you affected? Scan for Free

TL;DR

Uint::overflowing_shl and overflowing_shr in the ruint crate returned false-negative overflow flags. Left shifts missed bits shifted above BITS but still inside the top limb (non-limb-aligned widths such as U160) and limbs wholly discarded by shifts of 64 or more; right shifts missed wholly discarded low limbs. The shifted value itself was correct, but the wrong flag propagates to checked_*, strict_*, and saturating_* shift helpers. On no-alloc builds, the incorrect checked_shl result causes to_base_be (and string formatting) to loop forever for non-limb-aligned widths, enabling denial of service when formatting is reachable from untrusted input. Separately, wrapping_shl/wrapping_shr on 64/128/256-bit types truncated the shift amount modulo 2^32, so shifts of 2^32 or more returned an incorrectly wrapped value instead of zero.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and your application uses Uint shift helpers (overflowing_*, checked_*, saturating_*, or wrapping_*) with untrusted shift amounts, or formats Uint values on no-alloc builds where that path is reachable from untrusted input.

Background info

ruint is vulnerable to Denial of Service (DoS) in versions 0.1.0 - 1.19.0.

How to fix this

Upgrade the ruint library to the patch version.