9.8critical
Optional `Deserialize` implementations lacking validation
- Severity
- 9.8critical CVSS:3.1 by NVD
- Exploit likelihood
- 1.16% (higher than 68% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- mitre
- Also known as
- GHSA-jf5h-cf95-w759GHSA-w428-f65r-h4q2RUSTSEC-2021-0089
Description
An issue was discovered in the raw-cpuid crate before 9.1.1 for Rust. If the serialize feature is used (which is not the the default), a Deserialize operation may lack sufficient validation, leading to memory corruption or a panic.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| Unspecified product | n/a | CVE List |
| raw-cpuid (crates.io) | from 3.1.0 before 9.1.1, from 3.1.1-0 before 9.1.1 | GitHub Advisory Database, RustSec Advisory Database |
| raw-cpuid_project raw-cpuid | before 9.1.1 | NVD |
All scores
| GitHub | medium rating | |
| GitHub | 9.8critical CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| NVD | 9.8critical CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| NVD | 6.8medium CVSS:2.0 | AV:N/AC:M/Au:N/C:P/I:P/A:P |
Classification
What each source says
CVE List
An issue was discovered in the raw-cpuid crate before 9.1.1 for Rust. If the serialize feature is used (which is not the the default), a Deserialize operation may lack sufficient validation, leading to memory corruption or a panic.
GitHub Advisory Database
When activating the non-default feature serialize, most structs implement
serde::Deserialize without sufficient validation. This allows breaking
invariants in safe code, leading to:
- Undefined behavior in
as_string()methods (which usestd::str::from_utf8_unchecked()internally). - Panics due to failed assertions.
NVD (es)
Se ha detectado un problema en la crate raw-cpuid versiones anteriores a 9.1.1 para Rust. Si es usada la funcionalidad serialize (que no es la predeterminada), una operación de deserialización puede carecer de la suficiente comprobación, conllevando a una corrupción de memoria o un pánico
References
| https://rustsec.org/advisories/RUSTSEC-2021-0089.html | advisory, third-party-advisory, web | |
| https://raw.githubusercontent.com/rustsec/advisory-db/main/crates/raw-cpuid/RUSTSEC-2021-0089.md | third-party-advisory, web | |
| https://github.com/gz/rust-cpuid/issues/43 | report, web | |
| https://github.com/gz/rust-cpuid | package | |
| https://nvd.nist.gov/vuln/detail/CVE-2021-45687 | advisory | |
| https://crates.io/crates/raw-cpuid | package | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2021-45687 changed 2024-08-04 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-jf5h-cf95-w759 changed 2023-11-08 | CC-BY-4.0 |
| GitHub Advisory Database | GHSA-w428-f65r-h4q2 changed 2023-11-08 | CC-BY-4.0 |
| RustSec Advisory Database | RUSTSEC-2021-0089 changed 2023-11-08 | CC0-1.0 |
| NVD | CVE-2021-45687 changed 2026-06-17 | Public domain |