CVE-2021-28032 Use after free in nano_arena

Critical 9.8 Published Updated

A memory safety violation in the Rust nano_arena crate allows out-of-bounds writes or use-after-free, 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-28032?

CVE-2021-28032 is a critical use after free vulnerability in n/a, published on 5 Mar 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 nano_arena crate before 0.5.2 for Rust. There is an aliasing violation in split_at because two mutable references can exist for the same element, if Borrow<Idx> behaves in certain ways. This can have a resultant out-of-bounds write or use-after-free.

Which versions are affected by CVE-2021-28032?

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

PackageAffectedFixed in
nano_arena crates.ioAll versions0.5.2
nano_arena crates.ioAll versions0.5.2
nano_arena crates.ioFrom 0.0.0-00.5.2

Products include Nano Arena Project Nano Arena.

How do I fix CVE-2021-28032?

Upgrade nano_arena to 0.5.2 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-2021-28032 being exploited?

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

Sources

Also known as GHSA-wp34-mqw5-jj85, RUSTSEC-2021-0031.

Is CVE-2021-28032 in your software?

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

Check your SBOMs for free