CVE-2021-45720 Use after free in lru crate

High 7.5 Published Updated

A use-after-free vulnerability in the lru crate allows attackers to cause crashes or potentially execute arbitrary code via iterator misuse.

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

CVE-2021-45720 is a high-severity use after free 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 lru crate before 0.7.1 for Rust. The iterators have a use-after-free, as demonstrated by an access after a pop operation.

Weakness: CWE-416

Which versions are affected by CVE-2021-45720?

5 open source packages ship an affected version, including lru. It affects 1 product.

PackageAffectedFixed in
lru crates.ioAll versions0.7.1
lru crates.ioAll versions0.7.1
lru crates.ioAll versions0.7.1
lru crates.ioAll versions0.7.1
lru crates.ioFrom 0.0.0-00.7.1

Products include Lru Project Lru.

How do I fix CVE-2021-45720?

Upgrade lru to 0.7.1 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-45720 being exploited?

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

Sources

Also known as GHSA-qqmc-hwqp-8g2w, GHSA-v362-2895-h9r2, RUSTSEC-2021-0130.

Is CVE-2021-45720 in your software?

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

Check your SBOMs for free