Insecure Default Affecting os_str_bytes package, versions <2.0.0


Severity

Recommended
0.0
medium
0
10

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

Threat Intelligence

EPSS
0.09% (41st 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 Insecure Default vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-RUST-OSSTRBYTES-567484
  • published26 Apr 2020
  • disclosed14 Apr 2020
  • crediteduardosm

Introduced: 14 Apr 2020

CVE-2020-35865  (opens in a new tab)
CWE-276  (opens in a new tab)

How to fix?

Upgrade os_str_bytes to version 2.0.0 or higher.

Overview

os_str_bytes is a crate that allows interacting with the data stored internally by OsStr and OsString, without resorting to panics or corruption for invalid UTF-8.

Affected versions of this package are vulnerable to Insecure Default. The Windows implementation of os_str_bytes relied on the behavior of std::char::from_u32_unchecked when its safety clause is violated. Even though this worked with Rust versions up to 1.42 (at least), that behavior could change with any new Rust version, possibly leading a security issue.

References

CVSS Scores

version 3.1