GHSA-v935-pqmr-g8v9: Num bigint Unexpected Panics Vulnerability
MODERATEGHSA-v935-pqmr-g8v9 is a MODERATE unexpected panics vulnerability (CWE-20: Improper Input Validation) affecting Num bigint libraries in the crates.io ecosystem. The issue involves unexpected panics in num-bigint. Remediation is available by upgrading affected packages to version 0.4.3.
GHSA-v935-pqmr-g8v9 at a Glance
How to Fix GHSA-v935-pqmr-g8v9
To remediate this vulnerability, upgrade all affected Num bigint dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade num-bigint to 0.4.3
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for num-bigint
How to Check if You Are Affected
To determine whether your application is affected by GHSA-v935-pqmr-g8v9, inspect your project dependencies for Num bigint:
inspect dependencies for num-bigint
Analyze the terminal output to locate any version of Num bigint in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.4.3), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-20: Improper Input Validation, where the product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly. In Num bigint, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
GHSA-v935-pqmr-g8v9 Affected Num bigint Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
num-bigint
|
crates.io |
≥ 0.4.1
< 0.4.3
|
0.4.3
|
References
Frequently Asked Questions
What is GHSA-v935-pqmr-g8v9?
Which Num bigint versions are affected?
What version fixes GHSA-v935-pqmr-g8v9?
Is num-bigint affected?
What CWE is associated with GHSA-v935-pqmr-g8v9?
How can I check crates.io dependencies for GHSA-v935-pqmr-g8v9?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-v935-pqmr-g8v9",
"modified" : "2021-11-03T15:02:32Z",
"published" : "2021-11-03T17:36:04Z",
"aliases" : [ ],
"summary" : "Unexpected panics in num-bigint",
"details" : "### Impact\n\nTwo scenarios were reported where `BigInt` and `BigUint` multiplication may unexpectedly panic.\n\n- The internal `mac3` function did not expect the possibility of non-empty all-zero inputs, leading to an `unwrap()` panic.\n- A buffer was allocated with less capacity than needed for an intermediate result, leading to an assertion panic.\n\nRust 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.\n\n### Patches\nBoth problems were introduced in version 0.4.1, and are fixed in version 0.4.3.\n\n### For more information\nIf you have any questions or comments about this advisory, please open an issue in the [num-bigint](https://github.com/rust-num/num-bigint) repo.\n\n### Acknowledgements\nThanks to Guido Vranken and Arvid Norberg for privately reporting these issues to the author.\n\n### References\n* [GHSA-v935-pqmr-g8v9](https://github.com/rust-num/num-bigint/security/advisories/GHSA-v935-pqmr-g8v9)\n* [num-bigint#228](https://github.com/rust-num/num-bigint/pull/228)\n",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "crates.io",
"name" : "num-bigint"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.4.1"
}, {
"fixed" : "0.4.3"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/rust-num/num-bigint/security/advisories/GHSA-v935-pqmr-g8v9"
}, {
"type" : "WEB",
"url" : "https://github.com/rust-num/num-bigint/pull/228"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/rust-num/num-bigint"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-131", "CWE-20" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2021-11-03T15:02:32Z",
"nvd_published_at" : null
}
}