logo

CVE-2020-35865 os_str_bytes

Package

Manager: cargo
Name: os_str_bytes
Vulnerable Version: >=0 <2.0.0

Severity

Level: High

CVSS v3.1: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

CVSS v4.0: CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N

EPSS: 0.00334 pctl0.55653

Details

os_str_bytes relies on undefined behavior of `char::from_u32_unchecked` The Windows implementation of this crate 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. The flaw was corrected in version 2.0.0.

Metadata

Created: 2021-08-25T20:47:55Z
Modified: 2023-06-13T20:12:22Z
Source: https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2021/08/GHSA-q948-x8rf-888m/GHSA-q948-x8rf-888m.json
CWE IDs: ["CWE-704"]
Alternative ID: GHSA-q948-x8rf-888m
Finding: F113
Auto approve: 1