CVE-2021-38195
JSON

9.8critical

Overflow in libsecp256k1

Severity
9.8critical CVSS:3.1 by NVD
Exploit likelihood
0.91% (higher than 61% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
mitre
Also known as
GHSA-g4vj-x7v9-h82mRUSTSEC-2021-0076

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.

Affected

Product or packageVersionsReported by
Unspecified productn/aCVE List
libsecp256k1 (crates.io)before 0.5.0, from 0.0.0-0 before 0.5.0GitHub Advisory Database, RustSec Advisory Database
parity libsecp256k1before 0.5.0NVD

All scores

GitHub9.8critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
NVD9.8critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
NVD7.5high CVSS:2.0AV:N/AC:L/Au:N/C:P/I:P/A:P

Classification

What each source says

CVE List

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.

RustSec Advisory Database

libsecp256k1 accepts signatures whose R or S parameter is larger than the secp256k1 curve order, which differs from other implementations. This could lead to invalid signatures being verified.

The error is resolved in 0.5.0 by adding a check_overflow flag.

NVD (es)

Se ha detectado un problema en la crate libsecp256k1 versiones anteriores a 0.5.0 para Rust. Puede verificar una firma no válida porque permite que el parámetro R o S sea mayor que el orden de la curva, lo que supone un desbordamiento

References

Sources

SourceRecordLicence
CVE ListCVE-2021-38195 changed 2024-08-04CVE Terms of Use
GitHub Advisory DatabaseGHSA-g4vj-x7v9-h82m changed 2023-11-08CC-BY-4.0
RustSec Advisory DatabaseRUSTSEC-2021-0076 changed 2023-11-08CC0-1.0
NVDCVE-2021-38195 changed 2026-06-17Public domain