CVE-2021-45680 vec-const attempts to construct a Vec from a pointer to a const slice
A memory corruption vulnerability in the Rust vec-const crate allows attackers to potentially execute arbitrary code or cause denial of service.
- 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-45680?
CVE-2021-45680 is a high-severity memory corruption vulnerability in n/a, published on 26 Dec 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 vec-const crate before 2.0.0 for Rust. It tries to construct a Vec from a pointer to a const slice, leading to memory corruption.
Weakness: CWE-787
Which versions are affected by CVE-2021-45680?
5 open source packages ship an affected version, including vec-const. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
vec-const crates.io | All versions | 2.0.0 |
vec-const crates.io | All versions | 2.0.0 |
vec-const crates.io | All versions | 2.0.0 |
vec-const crates.io | All versions | 2.0.0 |
vec-const crates.io | From 0.0.0-0 | 2.0.0 |
Products include Vec-Const Project Vec-Const.
How do I fix CVE-2021-45680?
Upgrade vec-const to 2.0.0 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-45680 being exploited?
There is no known exploitation of CVE-2021-45680 in the wild and no public exploit code.
Sources
Also known as GHSA-jmwx-r3gq-qq3p, GHSA-x76r-966h-5qv9, RUSTSEC-2021-0082.