Advisory Database
  • Advisories
  • Dependency Scanning
  1. cargo
  2. ›
  3. libsecp256k1
  4. ›
  5. CVE-2021-38195

CVE-2021-38195: Overflow in libsecp256k1

August 25, 2021

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.

References

  • github.com/advisories/GHSA-g4vj-x7v9-h82m
  • github.com/paritytech/libsecp256k1
  • github.com/paritytech/libsecp256k1/pull/67
  • nvd.nist.gov/vuln/detail/CVE-2021-38195
  • rustsec.org/advisories/RUSTSEC-2021-0076.html

Code Behaviors & Features

Detect and mitigate CVE-2021-38195 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 0.5.0

Fixed versions

  • 0.5.0

Solution

Upgrade to version 0.5.0 or above.

Impact 9.8 CRITICAL

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Learn more about CVSS

Weakness

  • CWE-190: Integer Overflow or Wraparound
  • CWE-347: Improper Verification of Cryptographic Signature

Source file

cargo/libsecp256k1/CVE-2021-38195.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:16:14 +0000.