CVE-2020-35865 os_str_bytes relies on undefined behavior of `char::from_u32_unchecked`

High 7.5 Published Updated

The os_str_bytes crate mishandles character conversion, potentially causing unexpected behavior in Rust applications using it.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2020-35865?

CVE-2020-35865 is a high-severity vulnerability in n/a, published on 31 Dec 2020. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

An issue was discovered in the os_str_bytes crate before 2.0.0 for Rust. It has false expectations about char::from_u32_unchecked behavior.

Which versions are affected by CVE-2020-35865?

3 open source packages ship an affected version, including os_str_bytes. It affects 1 product.

PackageAffectedFixed in
os_str_bytes crates.ioAll versions2.0.0
os_str_bytes crates.ioAll versions2.0.0
os_str_bytes crates.ioFrom 0.0.0-02.0.0

Products include Os Str Bytes Project Os Str Bytes.

How do I fix CVE-2020-35865?

Upgrade os_str_bytes to 2.0.0 or later.

Is CVE-2020-35865 being exploited?

There is no known exploitation of CVE-2020-35865 in the wild and no public exploit code.

Sources

Also known as GHSA-q948-x8rf-888m, RUSTSEC-2020-0012.

Is CVE-2020-35865 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free