Advisory Database
  • Advisories
  • Dependency Scanning
  1. cargo
  2. ›
  3. num-bigint
  4. ›
  5. GHSA-v935-pqmr-g8v9

GHSA-v935-pqmr-g8v9: Unexpected panics in num-bigint

November 3, 2021

Two scenarios were reported where BigInt and BigUint multiplication may unexpectedly panic.

  • The internal mac3 function did not expect the possibility of non-empty all-zero inputs, leading to an unwrap() panic.
  • A buffer was allocated with less capacity than needed for an intermediate result, leading to an assertion panic.

Rust panics can either cause stack unwinding or program abort, depending on the application configuration. In some settings, an unexpected panic may constitute a denial-of-service vulnerability.

References

  • github.com/advisories/GHSA-v935-pqmr-g8v9
  • github.com/rust-num/num-bigint
  • github.com/rust-num/num-bigint/pull/228
  • github.com/rust-num/num-bigint/security/advisories/GHSA-v935-pqmr-g8v9

Code Behaviors & Features

Detect and mitigate GHSA-v935-pqmr-g8v9 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions starting from 0.4.1 before 0.4.3

Fixed versions

  • 0.4.3

Solution

Upgrade to version 0.4.3 or above.

Weakness

  • CWE-131: Incorrect Calculation of Buffer Size
  • CWE-20: Improper Input Validation

Source file

cargo/num-bigint/GHSA-v935-pqmr-g8v9.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:14:41 +0000.