CVE-2021-31162 Use after free in n/a

Critical 9.8 Published Updated

A double free vulnerability in the Rust standard library allows attackers to cause memory corruption and potential code execution via Vec::from_iter.

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

What is CVE-2021-31162?

CVE-2021-31162 is a critical use after free vulnerability in Fedoraproject Fedora, published on 14 Apr 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

In the standard library in Rust before 1.52.0, a double free can occur in the Vec::from_iter function if freeing the element panics.

Weakness: CWE-415

Which versions are affected by CVE-2021-31162?

It affects 2 products.

Products include Fedoraproject Fedora, Rust-Lang Rust.

How do I fix CVE-2021-31162?

Upgrade to a fixed version.

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-2021-31162 being exploited?

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

All Fedoraproject Fedora vulnerabilities

Sources

Also known as ALPINE-CVE-2021-31162, CLEANSTART-2026-YW17751, DEBIAN-CVE-2021-31162, GHSA-fjcw-72x2-rmmv, UBUNTU-CVE-2021-31162.

Is CVE-2021-31162 in your software?

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

Check your SBOMs for free