CVE-2021-29939 Out of bounds write in stackvector

High 7.3 Published Updated

An out-of-bounds write in the Rust stackvector crate allows attackers to cause memory corruption, potentially leading to code execution or crashes.

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-29939?

CVE-2021-29939 is a high-severity memory corruption vulnerability in n/a, published on 1 Apr 2021. 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 stackvector crate through 2021-02-19 for Rust. There is an out-of-bounds write in StackVec::extend if size_hint provides certain anomalous data.

Weakness: CWE-787

Which versions are affected by CVE-2021-29939?

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

PackageAffectedFixed in
stackvector crates.ioAll versions1.0.9
stackvector crates.ioAll versions1.0.9
stackvector crates.ioFrom 0.0.0-01.0.9

Products include Stackvector Project Stackvector.

How do I fix CVE-2021-29939?

Upgrade stackvector to 1.0.9 or later.

Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.

Is CVE-2021-29939 being exploited?

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

Sources

Also known as DEBIAN-CVE-2021-29939, GHSA-9frf-r7c7-j2vg, RUSTSEC-2021-0048, UBUNTU-CVE-2021-29939.

Is CVE-2021-29939 in your software?

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

Check your SBOMs for free