CVE-2021-26951 Out of bounds write in calamine

Critical 9.8 Published Updated

Attackers can overwrite heap memory and execute arbitrary code via improper memory handling in the calamine Rust library.

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

CVE-2021-26951 is a critical memory corruption vulnerability in n/a, published on 9 Feb 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 calamine crate before 0.17.0 for Rust. It allows attackers to overwrite heap-memory locations because Vec::set_len is used without proper memory claiming, and this uninitialized memory is used for a user-provided Read operation, as demonstrated by Sectors::get.

Weakness: CWE-908, CWE-787

Which versions are affected by CVE-2021-26951?

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

PackageAffectedFixed in
calamine crates.ioAll versions0.17.0
calamine crates.ioAll versions0.17.0
calamine crates.ioFrom 0.0.0-00.17.0

Products include Calamine Project Calamine.

How do I fix CVE-2021-26951?

Upgrade calamine to 0.17.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-26951 being exploited?

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

Sources

Also known as GHSA-ppqp-78xx-3r38, RUSTSEC-2021-0015.

Is CVE-2021-26951 in your software?

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

Check your SBOMs for free