CVE-2021-45681 QueryInterface should call AddRef before returning pointer

High 7.5 Published Updated

Attackers can trigger memory corruption in the derive-com-impl Rust crate due to missing AddRef calls, 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-45681?

CVE-2021-45681 is a high-severity memory corruption 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 derive-com-impl crate before 0.1.2 for Rust. An invalid reference (and memory corruption) can occur because AddRef might not be called before returning a pointer.

Weakness: CWE-787

Which versions are affected by CVE-2021-45681?

5 open source packages ship an affected version, including derive-com-impl. It affects 1 product.

PackageAffectedFixed in
derive-com-impl crates.ioAll versionsNone
derive-com-impl crates.ioAll versionsNone
derive-com-impl crates.ioAll versions0.1.2
derive-com-impl crates.ioAll versions0.1.2
derive-com-impl crates.ioFrom 0.0.0-00.1.2

Products include Derive-Com-Impl Project Derive-Com-Impl.

How do I fix CVE-2021-45681?

Upgrade derive-com-impl to 0.1.2 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-45681 being exploited?

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

Sources

Also known as GHSA-9rg7-3j4f-cf4x, GHSA-w4cc-pc2h-whcj, RUSTSEC-2021-0083.

Is CVE-2021-45681 in your software?

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

Check your SBOMs for free