CVE-2021-38195: Overflow in libsecp256k1

libsecp256k1 Updated 02 Oct 2025

Summary

25/08/2021
Yes i
Critical
9.8

CVE-2021-38195: Overflow in libsecp256k1. Affects libsecp256k1 versions < 0.5.0. Fixed in 0.5.0. How to fix ↓

Free scan

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.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

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 →

Share this vulnerability

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.

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 →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback