Critical Vulnerability in Node Elliptic Package: Signature Verification Flaw
Summary
DEBIAN-CVE-2024-48948: The Elliptic package 6.5.7 for Node.js, in its for ECDSA implementation, does not correctly verify valid signatures if the hash contains at least four leading 0 bytes and when the order of the elliptic curve's base point... Affects node-elliptic versions < 6.6.1+dfsg-1. Fixed in 6.6.1+dfsg-1. 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 Node Elliptic package is a widely used library for implementing elliptic curve cryptography in Node.js applications. It provides essential functionalities for secure communications and transactions, including ECDSA (Elliptic Curve Digital Signature Algorithm). However, a significant vulnerability has been identified in version 6.5.7, which affects its ability to correctly verify signatures under specific conditions, potentially compromising the integrity of applications relying on this library.
Vulnerability Detail
The vulnerability arises from an anomaly in the ECDSA implementation of the Elliptic package, specifically in the _truncateToN function. When the hash of a signature contains at least four leading zero bytes, and the order of the elliptic curve's base point is smaller than the hash, the package fails to verify valid signatures. This flaw can lead to legitimate transactions or communications being incorrectly flagged as invalid, posing a risk to the security and reliability of applications that utilize this package.
How To Fix
Minimum fixed version
6.6.1+dfsg-1
This is the first release that contains the fix.
sudo apt-get install --only-upgrade node-elliptic
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
As a temporary workaround, consider implementing additional validation checks in your application to verify the integrity of signatures before processing them. However, this is not a complete solution and should not replace updating the package.
Conclusion
The vulnerability in the Node Elliptic package poses a significant risk to applications relying on its cryptographic functionalities. It is crucial to update to the patched version to ensure the integrity and reliability of your applications. Utilizing tools like Vulert can help monitor and alert for such vulnerabilities in real-time.
See every vulnerability recorded for node-elliptic →
FAQ
The vulnerability can lead to valid signatures being rejected, which may cause legitimate transactions or communications to fail.
You can use Vulert, which monitors open-source vulnerabilities in real-time. By utilizing the Vulert playground, you can check if your application is affected by this vulnerability without needing to sign up.
The vulnerability affects version 6.5.7 of the Node Elliptic package. Versions 6.6.1+dfsg-1 and later contain the necessary fixes.
While the vulnerability does not directly cause data loss, it can lead to failed transactions, which may disrupt operations and require manual intervention.
If immediate updates are not possible, implement additional validation checks as a temporary measure and prioritize updating the package as soon as feasible.
References
Related vulnerabilities
Recent vulnerabilities recorded for node-elliptic.