Improper Input Validation Affecting raw-cpuid package, versions >=3.1.0 <9.1.1


Severity

Recommended
0.0
medium
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.22% (60th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Improper Input Validation vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-RUST-RAWCPUID-1569200
  • published24 Aug 2021
  • disclosed20 Jan 2021
  • creditUnknown

Introduced: 20 Jan 2021

CVE-2021-45687  (opens in a new tab)
CWE-20  (opens in a new tab)

How to fix?

Upgrade raw-cpuid to version 9.1.1 or higher.

Overview

raw-cpuid is a Parses the x86 CPUID instruction.

Affected versions of this package are vulnerable to Improper Input Validation. 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) and panics due to failed assertions.

CVSS Scores

version 3.1