CVE-2020-35917 Reference counting error in pyo3

Medium 5.5 Published Updated

A use-after-free vulnerability in the pyo3 Rust crate allows attackers to potentially execute arbitrary code or cause a denial of service.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2020-35917?

CVE-2020-35917 is a medium-severity use after free vulnerability in n/a, published on 31 Dec 2020. It can only be exploited from the same machine or local network, with no action from the victim.

Official description

An issue was discovered in the pyo3 crate before 0.12.4 for Rust. There is a reference-counting error and use-after-free in From<Py<T>>.

Weakness: CWE-416

Which versions are affected by CVE-2020-35917?

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

PackageAffectedFixed in
pyo3 crates.ioFrom 0.12.00.12.4
pyo3 crates.ioFrom 0.12.00.12.4
pyo3 crates.ioFrom 0.12.00.12.4

Products include Pyo3 Project Pyo3.

How do I fix CVE-2020-35917?

Upgrade pyo3 to 0.12.4 or later.

Upgrade to the fixed version. These bugs are found with fuzzing and sanitisers and avoided by memory-safe languages. More about Use after free.

Is CVE-2020-35917 being exploited?

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

Sources

Also known as GHSA-2vx6-fcw6-hpr6, RUSTSEC-2020-0074.

Is CVE-2020-35917 in your software?

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

Check your SBOMs for free