CVE-2021-29935 Use after free in Rocket

High 7.3 Published Updated

A use-after-free vulnerability in the Rocket Rust web framework allows attackers to cause crashes or potentially execute code via panicking user functions.

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

CVE-2021-29935 is a high-severity use after free 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 rocket crate before 0.4.7 for Rust. uri::Formatter can have a use-after-free if a user-provided function panics.

Weakness: CWE-416

Which versions are affected by CVE-2021-29935?

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

PackageAffectedFixed in
rocket crates.ioAll versions0.4.7
rocket crates.ioAll versions0.4.7
rocket crates.ioFrom 0.0.0-00.4.7

Products include Rocket Rocket.

How do I fix CVE-2021-29935?

Upgrade rocket to 0.4.7 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-29935 being exploited?

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

Sources

Also known as GHSA-vcw4-8ph6-7vw8, RUSTSEC-2021-0044.

Is CVE-2021-29935 in your software?

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

Check your SBOMs for free