Critical Overflow Flag Issue in ruint Package: Uint Shift Operations Vulnerability

ruint Updated 01 Aug 2026

Summary

08/07/2026
N/A
Yes i
Unrated
Not published

RUSTSEC-2026-0220: Uint shift operations: incorrect overflow flags and truncated shift amounts. Affects ruint versions >= 0.0.0-0, < 1.20.0. Fixed in 1.20.0. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

The ruint package is a Rust library that provides arbitrary precision unsigned integer types. It is designed for applications requiring high-performance arithmetic operations on large integers. However, the package has a vulnerability related to its shift operations, which can lead to incorrect overflow flags and potential denial of service in certain scenarios.

Vulnerability Detail

The vulnerability arises from the incorrect handling of overflow flags in the shift operations of the Uint type. Specifically, the methods overflowing_shl and overflowing_shr fail to return accurate overflow flags when bits are shifted beyond the defined limits. This can lead to false positives in overflow checks, causing functions like checked_shl and checked_shr to return unexpected results. The incorrect flags can propagate through the code, leading to infinite loops in string formatting functions when untrusted input is processed, posing a significant denial of service risk. Additionally, the wrapping_shl and wrapping_shr methods truncate shift amounts incorrectly, which can result in erroneous calculations on certain architectures.

How To Fix

Latest published version: 1.21.0 as of 23 Oct 2026

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

1.20.0

This is the first release that contains the fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, avoid using the affected shift operations (checked_shl, checked_shr, overflowing_shl, overflowing_shr, saturating_shl, saturating_shr, wrapping_shl, and wrapping_shr) with untrusted shift amounts until the package is updated.

Conclusion

The ruint package has a critical vulnerability related to its shift operations, which can lead to incorrect overflow handling and denial of service risks. It is essential to update to version 1.20.0 or later to mitigate these risks. Users are encouraged to monitor their applications for vulnerabilities using tools like Vulert.

See every vulnerability recorded for ruint →

Share this vulnerability

FAQ

The vulnerability involves incorrect overflow flag handling in shift operations, which can lead to erroneous results and potential denial of service.

You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without any signup.

The consequences include incorrect calculations, infinite loops in string formatting, and potential denial of service when processing untrusted input.

Yes, the vulnerability has been patched in version 1.20.0 of the ruint package. Updating to this version will resolve the issue.

If an immediate update is not possible, avoid using the affected shift operations with untrusted inputs as a temporary workaround.

Related vulnerabilities

Recent vulnerabilities recorded for ruint.

How To Fix

Latest published version: 1.21.0 as of 23 Oct 2026

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

1.20.0

This is the first release that contains the fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback