CVE-2021-38195: Overflow in libsecp256k1
Summary
CVE-2021-38195: Overflow in libsecp256k1. Affects libsecp256k1 versions < 0.5.0. Fixed in 0.5.0. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
The libsecp256k1 crate is a library for elliptic curve cryptography operations in Rust. It provides functionality for working with the secp256k1 elliptic curve, which is commonly used in blockchain applications. This vulnerability affects versions prior to 0.5.0 of the crate. The vulnerability allows for the verification of an invalid signature due to an overflow issue. Specifically, it permits the R or S parameter to be larger than the curve order, leading to potential security risks.
Vulnerability Detail
The overflow vulnerability in libsecp256k1 can be exploited to verify an invalid signature. By allowing the R or S parameter to exceed the curve order, an attacker can manipulate the signature verification process. This could result in unauthorized access, data tampering, or other malicious activities. The severity of this vulnerability is rated as CRITICAL with a CVSS score of 9.8.
How To Fix
Latest published version: 0.7.2 as of 23 Oct 2026
Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.
If you need the minimum change
0.5.0
This is the first release that contains the fix.
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
There is no known workaround for this vulnerability. It is essential to update to the fixed version of the libsecp256k1 crate to mitigate the risk of exploitation.
Conclusion
The overflow vulnerability in libsecp256k1 can have severe consequences, including unauthorized access and data tampering. It is crucial to update to version 0.5.0 or later of the libsecp256k1 crate to mitigate the risk. For further support on vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for libsecp256k1 →
FAQ
Libsecp256k1 is a Rust crate that provides elliptic curve cryptography operations for the secp256k1 curve, commonly used in blockchain applications.
The vulnerability allows for the verification of invalid signatures, which can lead to unauthorized access, data tampering, or other malicious activities.
The severity of this vulnerability is rated as CRITICAL with a CVSS score of 9.8.
To fix this vulnerability, it is recommended to upgrade to version 0.5.0 or later of the libsecp256k1 crate.
There is no known workaround for this vulnerability. Updating to the fixed version is the recommended solution.
Related vulnerabilities
Recent vulnerabilities recorded for libsecp256k1.