Skip to main content
CVE Vulnerability Database
Vulnerability Database/CVE-2024-42461

CVE-2024-42461: Elliptic ECDSA Signature Malleability

CVE-2024-42461 is an ECDSA signature malleability flaw in the Elliptic package for Node.js caused by BER-encoded signatures. This vulnerability can compromise cryptographic integrity. Learn about affected versions and fixes.

Published:

CVE-2024-42461 Overview

CVE-2024-42461 is a cryptographic vulnerability affecting the Elliptic package version 6.5.6 for Node.js. The vulnerability stems from improper verification of ECDSA (Elliptic Curve Digital Signature Algorithm) signatures, where BER-encoded signatures are incorrectly allowed. This signature malleability issue enables attackers to potentially forge or modify cryptographic signatures without detection, undermining the integrity guarantees that ECDSA signatures are designed to provide.

Critical Impact

ECDSA signature malleability allows attackers to create alternate valid signatures for the same message, potentially bypassing authentication mechanisms, tampering with signed transactions, or circumventing integrity verification in applications relying on the Elliptic library.

Affected Products

  • Elliptic package version 6.5.6 for Node.js
  • Applications and services using the vulnerable elliptic npm package
  • Cryptocurrency wallets and blockchain applications utilizing ECDSA signing via Elliptic

Discovery Timeline

  • 2024-08-02 - CVE-2024-42461 published to NVD
  • 2025-11-03 - Last updated in NVD database

Technical Details for CVE-2024-42461

Vulnerability Analysis

This vulnerability is classified under CWE-347 (Improper Verification of Cryptographic Signature). The core issue lies in how the Elliptic library handles signature encoding formats during ECDSA signature verification.

ECDSA signatures should strictly follow DER (Distinguished Encoding Rules) format, which enforces canonical encoding. However, the vulnerable version of Elliptic also accepts BER (Basic Encoding Rules) encoded signatures. BER is more permissive than DER and allows multiple valid encodings for the same data structure. This permissiveness introduces signature malleability, where an attacker can take a valid signature and transform it into a different but still valid signature for the same message.

The practical impact of this vulnerability is significant for systems that rely on signature uniqueness for transaction deduplication, authentication tracking, or audit logging. An attacker could potentially replay modified signatures or cause inconsistencies in systems that use signature hashes as unique identifiers.

Root Cause

The root cause is the library's acceptance of BER-encoded ECDSA signatures instead of enforcing strict DER encoding validation. In cryptographic implementations, the distinction between BER and DER is critical—DER enforces a single canonical representation, while BER allows multiple valid representations of the same underlying data. By accepting BER encoding, the library permits signature malleability, violating the expected properties of ECDSA signature verification.

The signature parsing code fails to reject non-canonical encodings, including signatures with unnecessary leading zeros, non-minimal length encodings, or other BER-permitted variations that would be invalid under DER rules.

Attack Vector

The attack vector is network-based, requiring no privileges or user interaction. An attacker can exploit this vulnerability by:

  1. Intercepting a legitimate ECDSA signature from network traffic or public sources
  2. Manipulating the signature encoding from DER to an equivalent BER representation
  3. Submitting the modified signature to a system using the vulnerable Elliptic library
  4. The modified signature passes verification despite being different from the original

This can lead to authentication bypass if systems compare signature bytes directly, transaction replay attacks in blockchain applications, or circumvention of signature-based access controls. The vulnerability allows modification of signature representations while maintaining cryptographic validity, which can confuse systems expecting signature uniqueness.

Detection Methods for CVE-2024-42461

Indicators of Compromise

  • Multiple valid but byte-different signatures appearing for identical messages
  • Signature verification passing for non-DER encoded signature formats
  • Unusual signature lengths or encodings in application logs
  • Transaction or authentication anomalies where signature hashes don't match expected values

Detection Strategies

  • Audit npm dependency trees using npm audit or npm ls elliptic to identify vulnerable versions
  • Implement Software Composition Analysis (SCA) tools to continuously monitor for vulnerable dependencies
  • Review application logs for signature verification anomalies or duplicate transactions with different signature hashes
  • Monitor package-lock.json or yarn.lock files for outdated Elliptic library versions

Monitoring Recommendations

  • Configure dependency scanning in CI/CD pipelines to flag elliptic@6.5.6 as vulnerable
  • Implement runtime monitoring for cryptographic operations in Node.js applications
  • Set up alerts for authentication failures or signature verification anomalies
  • Track npm security advisories and GitHub security alerts for the Elliptic repository

How to Mitigate CVE-2024-42461

Immediate Actions Required

  • Update the Elliptic package to the latest patched version immediately
  • Run npm audit fix to automatically resolve vulnerable dependencies
  • Review applications using ECDSA signatures for potential malleability-related issues
  • Audit authentication and transaction systems that rely on signature uniqueness

Patch Information

The vulnerability has been addressed through a pull request on GitHub that enforces strict DER encoding validation for ECDSA signatures. Organizations should update their elliptic dependency to a version that includes this fix.

For environments tracking security advisories, NetApp has published additional guidance regarding this vulnerability.

To update the Elliptic package:

bash
npm update elliptic

Verify the installed version after updating:

bash
npm ls elliptic

Workarounds

  • Implement application-level signature canonicalization before verification
  • Add custom validation to reject non-DER encoded signatures before passing to the Elliptic library
  • Consider temporarily switching to alternative cryptographic libraries with strict DER enforcement
  • Implement signature normalization in upstream systems before storage or comparison
bash
# Check current elliptic version and update
npm ls elliptic
npm update elliptic
npm audit

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.