CVE-2021-38195 Overflow in libsecp256k1

Critical 9.8 Published Updated

The libsecp256k1 Rust library incorrectly verifies invalid signatures by allowing parameters to exceed the curve order, bypassing cryptographic validation.

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

CVE-2021-38195 is a critical vulnerability in n/a, published on 8 Aug 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 libsecp256k1 crate before 0.5.0 for Rust. It can verify an invalid signature because it allows the R or S parameter to be larger than the curve order, aka an overflow.

Weakness: CWE-347

Which versions are affected by CVE-2021-38195?

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

PackageAffectedFixed in
libsecp256k1 crates.ioAll versions0.5.0
libsecp256k1 crates.ioAll versions0.5.0
libsecp256k1 crates.ioFrom 0.0.0-00.5.0

Products include Parity Libsecp256k1.

How do I fix CVE-2021-38195?

Upgrade libsecp256k1 to 0.5.0 or later.

Is CVE-2021-38195 being exploited?

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

Sources

Also known as GHSA-g4vj-x7v9-h82m, RUSTSEC-2021-0076.

Is CVE-2021-38195 in your software?

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

Check your SBOMs for free