GHSA-jf5h-cf95-w759: Raw cpuid Optional `Deserialize` Implementations Lacking Validation Vulnerability
MODERATEGHSA-jf5h-cf95-w759 is a MODERATE optional `deserialize` implementations lacking validation vulnerability (General Security Weakness) affecting Raw cpuid libraries in the crates.io ecosystem. The issue involves optional `deserialize` implementations lacking validation. Remediation is available by upgrading affected packages to version 9.1.1.
GHSA-jf5h-cf95-w759 at a Glance
How to Fix GHSA-jf5h-cf95-w759
To remediate this vulnerability, upgrade all affected Raw cpuid 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 raw-cpuid to 9.1.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for raw-cpuid
How to Check if You Are Affected
To determine whether your application is affected by GHSA-jf5h-cf95-w759, inspect your project dependencies for Raw cpuid:
inspect dependencies for raw-cpuid
Analyze the terminal output to locate any version of Raw cpuid in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 9.1.1), 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 General Security Weakness. In Raw cpuid, 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-jf5h-cf95-w759 Affected Raw cpuid Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
raw-cpuid
|
crates.io |
≥ 3.1.0
< 9.1.1
|
9.1.1
|
References
Frequently Asked Questions
What is GHSA-jf5h-cf95-w759?
Which Raw cpuid versions are affected?
What version fixes GHSA-jf5h-cf95-w759?
Is raw-cpuid affected?
What CWE is associated with GHSA-jf5h-cf95-w759?
How can I check crates.io dependencies for GHSA-jf5h-cf95-w759?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-jf5h-cf95-w759",
"modified" : "2022-06-17T00:16:24Z",
"published" : "2022-06-17T00:16:24Z",
"aliases" : [ ],
"summary" : "Optional `Deserialize` implementations lacking validation",
"details" : "When activating the non-default feature `serialize`, most structs implement\n`serde::Deserialize` without sufficient validation. This allows breaking\ninvariants in safe code, leading to:\n\n* Undefined behavior in `as_string()` methods (which use\n `std::str::from_utf8_unchecked()` internally).\n* Panics due to failed assertions.\n\nSee https://github.com/gz/rust-cpuid/issues/43.\n",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "crates.io",
"name" : "raw-cpuid"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "3.1.0"
}, {
"fixed" : "9.1.1"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/gz/rust-cpuid/issues/43"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/gz/rust-cpuid"
}, {
"type" : "WEB",
"url" : "https://rustsec.org/advisories/RUSTSEC-2021-0089.html"
} ],
"database_specific" : {
"cwe_ids" : [ ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2022-06-17T00:16:24Z",
"nvd_published_at" : null
}
}