RUSTSEC-2026-0220
Uint shift operations: incorrect overflow flags and truncated shift amounts
Mitigation
- Upgrade ruint to 1.20.0 or later.
Who should check
- Projects that depend on crates.io package ruint (>= 0.0.0-0, < 1.20.0)
Vulnerability facts
- Affected
- ruint >= 0.0.0-0, < 1.20.0
- Fixed in
- 1.20.0
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Unknown
- CVSS
- Not scored yet
- Modified
Description
`Uint::overflowing_shl`/`overflowing_shr` returned false-negative overflow flags. `overflowing_shl` missed bits shifted above `BITS` but within the top limb (non-limb-aligned widths such as `U160`), and limbs wholly discarded by shifts >= 64; `overflowing_shr` missed wholly discarded low limbs. Shifted values were correct; only the flag was wrong. The wrong flag propagates: `checked_shl`/`checked_shr` return `Some` instead of `None`, `strict_*` fail to panic, and `saturating_*` return a wrapped value instead of saturating. The incorrect `checked_shl` result causes `to_base_be` (and string formatting) to loop forever on no-alloc builds for non-limb-aligned widths — a denial of service if 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 >= 2^32 returned an incorrectly wrapped value instead of zero; on 32-bit targets the generic path also truncated 64-bit shift amounts. Callers using checked or saturating shift semantics on untrusted shift amounts may compute incorrect results.
Affected and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| crates.io ruint | >= 0.0.0-0, < 1.20.0 | 1.20.0 | osv |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by RUSTSEC-2026-0220. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/RUSTSEC-2026-0220.md Affected: ruint >= 0.0.0-0, < 1.20.0 Fixed in: 1.20.0 Steps: 1. Search this machine and project for ruint (crates.io): dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
Vendor advisories
FAQ
Is RUSTSEC-2026-0220 being exploited?
There is no confirmed exploitation: RUSTSEC-2026-0220 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known.
How serious is RUSTSEC-2026-0220?
It has no CVSS score yet. Unknown.
Which versions are affected by RUSTSEC-2026-0220?
ruint >= 0.0.0-0, < 1.20.0.
Is there a fix for RUSTSEC-2026-0220?
Yes. Fixed in 1.20.0. Upgrade ruint to 1.20.0 or later.
How do I check if I'm affected by RUSTSEC-2026-0220?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.