CVE-2024-23342: Ecdsa Minerva Timing Attack On P-256 Vulnerability

HIGH
Advisory Identifier: GHSA-wj6h-64fc-37mp
CVSS 7.4
CWE-203 CWE-385 CWE-208
Published
Advisory Summary

CVE-2024-23342 is a HIGH (CVSS 7.4) minerva timing attack on p-256 vulnerability (CWE-203: Observable Discrepancy) affecting Ecdsa libraries in the PyPI ecosystem. The issue involves minerva timing attack on p-256 in python-ecdsa. Remediation is available in the latest vendor maintenance releases.

CVE-2024-23342 at a Glance

CVE Identifier CVE-2024-23342
GHSA Identifier GHSA-wj6h-64fc-37mp
Severity HIGH
CVSS v3.1 Base Score 7.4
CWE Classification CWE-203: Observable Discrepancy
Affected Product Ecdsa
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 7.4

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability None (A:N)

How to Fix CVE-2024-23342

To remediate this vulnerability, upgrade all affected Ecdsa dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

ecdsa fixed: Latest secure release
pip install ecdsa>=Latest secure release
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show ecdsa

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2024-23342, inspect your installed packages using pip:

pip show ecdsa

Analyze the terminal output to locate any version of Ecdsa in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), your application is affected.

Note: The pip show ecdsa command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-203: Observable Discrepancy, where the product behaves differently or sends different responses under different circumstances in a way that is observable to an unauthorized actor. In Ecdsa, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

python-ecdsa has been found to be subject to a Minerva timing attack on the P-256 curve. Using the `ecdsa.SigningKey.sign_digest()` API function and timing signatures an attacker can leak the internal nonce which may allow for private key discovery. Both ECDSA signatures, key generation, and ECDH operations are affected. ECDSA signature verification is unaffected. The python-ecdsa project considers side channel attacks out of scope for the project and there is no planned fix.

CVE-2024-23342 Affected Ecdsa Versions

1 component(s)
Product / Package Ecosystem Affected Versions Fixed Version
ecdsa
PyPI

References

Frequently Asked Questions

What is CVE-2024-23342?
CVE-2024-23342 is a security vulnerability in Ecdsa involving Minerva timing attack on P-256 in python-ecdsa under CWE-203: Observable Discrepancy.
Which Ecdsa versions are affected?
Affected versions include releases prior to current release patches across affected packages: ecdsa.
What version fixes CVE-2024-23342?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is ecdsa affected?
Yes, ecdsa is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What is the CVSS score of CVE-2024-23342?
CVE-2024-23342 has a CVSS v3.1 base score of 7.4 (HIGH) with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N.
What CWE is associated with CVE-2024-23342?
CVE-2024-23342 is classified under CWE-203: Observable Discrepancy (The product behaves differently or sends different responses under different circumstances in a way that is observable to an unauthorized actor.).
How can I check PyPI dependencies for CVE-2024-23342?
Run the dependency tree command: 'pip show ecdsa'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-wj6h-64fc-37mp",
  "modified" : "2025-07-30T18:17:40Z",
  "published" : "2024-01-22T21:35:27Z",
  "aliases" : [ "CVE-2024-23342" ],
  "summary" : "Minerva timing attack on P-256 in python-ecdsa",
  "details" : "python-ecdsa has been found to be subject to a Minerva timing attack on the P-256 curve. Using the `ecdsa.SigningKey.sign_digest()` API function and timing signatures an attacker can leak the internal nonce which may allow for private key discovery. Both ECDSA signatures, key generation, and ECDH operations are affected. ECDSA signature verification is unaffected. The python-ecdsa project considers side channel attacks out of scope for the project and there is no planned fix.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "ecdsa"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/tlsfuzzer/python-ecdsa/security/advisories/GHSA-wj6h-64fc-37mp"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-23342"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/tlsfuzzer/python-ecdsa"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/tlsfuzzer/python-ecdsa/blob/master/SECURITY.md"
  }, {
    "type" : "WEB",
    "url" : "https://minerva.crocs.fi.muni.cz"
  }, {
    "type" : "WEB",
    "url" : "https://securitypitfalls.wordpress.com/2018/08/03/constant-time-compare-in-python"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-203", "CWE-208", "CWE-385" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-01-22T21:35:27Z",
    "nvd_published_at" : "2024-01-23T00:15:26Z"
  }
}