CVE-2019-16138 Use after free in image

Critical 9.8 Published Updated

A use-after-free vulnerability in the Rust image crate's HDR decoder allows attackers to execute arbitrary code via malicious images.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2019-16138?

CVE-2019-16138 is a critical use after free vulnerability in n/a, published on 9 Sep 2019. 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 image crate before 0.21.3 for Rust, affecting the HDR image format decoder. Vec::set_len is called on an uninitialized vector, leading to a use-after-free and arbitrary code execution.

Weakness: CWE-416

Which versions are affected by CVE-2019-16138?

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

PackageAffectedFixed in
image crates.ioFrom 0.10.20.21.3
image crates.ioFrom 0.10.20.21.3
image crates.ioFrom 0.10.20.21.3

Products include Image-Rs Image.

How do I fix CVE-2019-16138?

Upgrade image to 0.21.3 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-2019-16138 being exploited?

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

Sources

Also known as GHSA-m2pf-hprp-3vqm, RUSTSEC-2019-0014.

Is CVE-2019-16138 in your software?

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

Check your SBOMs for free