Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
🦀 crates.io
Not in CISA KEV

CVE-2021-45687 — raw-cpuid

CVE-2021-45687 is a Improper Input Validation vulnerability in raw-cpuid. A fix is available for raw-cpuid — see the affected versions and patch details below.

Optional `Deserialize` implementations lacking validation

Also known asGHSA-w428-f65r-h4q2RUSTSEC-2021-0089
Published
Updated
Affected
1 pkg
Patched
1 / 1
Exploits
None indexed
Exploitation data as of Oct 8, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

EPSS Exploitation Probability

via FIRST.org ↗
1.1%probability of exploitation in next 30 days
Lower Risk0.00%
Lower risk than most CVEs65th percentile — riskier than 65% of all scored CVEsHighest risk
0.00%0.54%1.08%1.62%0.4%1.1%Apr 26Aug 26Oct 26

Probability of exploitation in the next 30 days, from FIRST.org EPSS.

Real-World Exposure

1 pkg affected
🦀raw-cpuid

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects crates.io packages — download data is not available via public APIs for these ecosystems.

Description

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 use std::str::from_utf8_unchecked() internally).
  • Panics due to failed assertions.

See https://github.com/gz/rust-cpuid/issues/43.

Affected Packages

1 total 1 fixed
EcosystemPackageVulnerable rangeFix
🦀crates.ioraw-cpuid≥ 3.1.0&&< 9.1.19.1.1cargo update -p raw-cpuid --precise 9.1.1

Affected Products

1 product · 1 configurations
Application
raw-cpuidraw-cpuid_project
< 9.1.1
range

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for raw-cpuid, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update raw-cpuid to 9.1.1 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2021-45687 is resolved across your whole dependency graph.

  3. Workarounds

    Do not deserialise data from untrusted sources: where the format allows it, restrict deserialisation to an explicit allowlist of expected types, and prefer a data-only format (JSON, Protobuf) over one that can reconstruct arbitrary objects until you can upgrade.

Frequently Asked Questions

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 use `std::str::from_utf8_unchecked()` internally). * Panics due to failed assertions. See https://github.com/gz/rust-cpuid/issues/43.
O3 Security · Impact-Aware SCA

Is CVE-2021-45687 in your dependencies?

Find it across crates.io, including transitive dependencies.

CVE-2021-45687: raw-cpuid — Fixed in 9.1.1