{"id":"CVE-2021-45687","aliases":["CVE-2021-45687","GHSA-jf5h-cf95-w759","GHSA-w428-f65r-h4q2","RUSTSEC-2021-0089"],"related":[],"kind":"vulnerability","state":"published","title":"Optional `Deserialize` implementations lacking validation","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"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.","format":"markdown","source":"ghsa"},{"lang":"es","text":"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","source":"nvd"}],"published":"2021-01-20T12:00:00.000Z","modified":"2026-06-17T04:13:56.937Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},"severities":[{"scorer":"GitHub","scheme":"rating","rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:M/Au:N/C:P/I:P/A:P","score":6.8,"rating":"MEDIUM"}],"cwes":["CWE-20","CWE-502"],"affected":[{"ranges":[{"version":"n/a","status":"affected"}],"source":"cvelist"},{"ranges":[{"type":"semver","introduced":"3.1.0","status":"affected","fixed":"9.1.1"}],"ecosystem":"crates.io","package":"raw-cpuid","purl":"pkg:cargo/raw-cpuid","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"3.1.0","status":"affected","fixed":"9.1.1"}],"ecosystem":"crates.io","package":"raw-cpuid","purl":"pkg:cargo/raw-cpuid","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"3.1.1-0","status":"affected","fixed":"9.1.1"}],"ecosystem":"crates.io","package":"raw-cpuid","purl":"pkg:cargo/raw-cpuid","source":"rustsec"},{"ranges":[{"status":"affected","fixed":"9.1.1"}],"vendor":"raw-cpuid_project","product":"raw-cpuid","cpe":"cpe:2.3:a:raw-cpuid_project:raw-cpuid:*:*:*:*:*:rust:*:*","source":"nvd"}],"references":[{"url":"https://rustsec.org/advisories/RUSTSEC-2021-0089.html","tags":["advisory","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","rustsec","nvd"]},{"url":"https://raw.githubusercontent.com/rustsec/advisory-db/main/crates/raw-cpuid/RUSTSEC-2021-0089.md","tags":["third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/gz/rust-cpuid/issues/43","tags":["report","web"],"sources":["ghsa","rustsec"]},{"url":"https://github.com/gz/rust-cpuid","tags":["package"],"sources":["ghsa"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-45687","tags":["advisory"],"sources":["ghsa"]},{"url":"https://crates.io/crates/raw-cpuid","tags":["package"],"sources":["rustsec"]}],"credits":[],"assigner":"mitre","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2021-45687","url":"https://www.cve.org/CVERecord?id=CVE-2021-45687","licence":"CVE Terms of Use","modified":"2024-08-04T04:47:02.388Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-jf5h-cf95-w759","url":"https://github.com/advisories/GHSA-jf5h-cf95-w759","licence":"CC-BY-4.0","modified":"2023-11-08T04:07:21.872Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-w428-f65r-h4q2","url":"https://github.com/advisories/GHSA-w428-f65r-h4q2","licence":"CC-BY-4.0","modified":"2023-11-08T04:07:21.872Z"},{"source":"rustsec","name":"RustSec Advisory Database","id":"RUSTSEC-2021-0089","url":"https://rustsec.org/advisories/RUSTSEC-2021-0089.html","licence":"CC0-1.0","modified":"2023-11-08T04:07:21.872Z"},{"source":"nvd","name":"NVD","id":"CVE-2021-45687","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-45687","licence":"Public domain","modified":"2026-06-17T04:13:56.937Z"}],"updatedAt":"2026-11-25T22:58:06.262Z","epss":{"score":0.0116,"percentile":0.68037,"date":"2026-12-01T12:00:22.000Z"}}