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 package | Versions | Reported by |
|---|---|---|
| Unspecified product | n/a | CVE List |
| libsecp256k1 (crates.io) | before 0.5.0, from 0.0.0-0 before 0.5.0 | GitHub Advisory Database, RustSec Advisory Database |
| parity libsecp256k1 | before 0.5.0 | NVD |
All scores
| GitHub | 9.8critical CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| NVD | 9.8critical CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| NVD | 7.5high CVSS:2.0 | AV: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
| https://rustsec.org/advisories/RUSTSEC-2021-0076.html | advisory, exploit, issue-tracking, patch, third-party-advisory, web | |
| https://raw.githubusercontent.com/rustsec/advisory-db/main/crates/libsecp256k1/RUSTSEC-2021-0076.md | third-party-advisory | |
| https://nvd.nist.gov/vuln/detail/CVE-2021-38195 | advisory | |
| https://github.com/paritytech/libsecp256k1/pull/67 | web | |
| https://github.com/paritytech/libsecp256k1 | package | |
| https://crates.io/crates/libsecp256k1 | package | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2021-38195 changed 2024-08-04 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-g4vj-x7v9-h82m changed 2023-11-08 | CC-BY-4.0 |
| RustSec Advisory Database | RUSTSEC-2021-0076 changed 2023-11-08 | CC0-1.0 |
| NVD | CVE-2021-38195 changed 2026-06-17 | Public domain |