Elliptic JavaScript library permits signature forgery and verification failures
Missing modular reductions and length checks in the elliptic library enable attackers to forge signatures or cause valid signatures to be rejected.
Security & privacy Trail of Bits 18 Nov 2025 Disclosure Real-world evidence
Published as “We found cryptography bugs in the elliptic library using Wycheproof”
Why it matters
These bugs could allow attackers to break consensus in protocols or cause legitimate signatures to be rejected, affecting thousands of projects that depend on elliptic.
Summary
The researchers ran the Wycheproof test suite against the popular elliptic JavaScript library and found two critical bugs. One bug (CVE-2024-48949) omits a range check on the EdDSA scalar, allowing an attacker to forge a new valid signature for a known message-signature pair. The second bug (CVE-2024-48948) drops leading zeros when converting the hash to a big number, causing ECDSA verification to fail for certain hashes with a probability of up to 2^-32. Both issues were confirmed with proof-of-concept code, disclosed via GitHub advisories, and patches were submitted, though one remains unfixed.
What they found 1
- BN conversion drops leading zeros, causing ECDSA verification to fail for certain hashes.
“The issue in the elliptic library arises because the new BN(msg, 16) conversion removes leading zeros, resulting in a smaller hash that takes up fewer bytes.”
Caveats 4
- One vulnerability is still not fixed after a 90-day disclosure window that ended in October 2024.
- The EdDSA forgery only works for a known signature and message pair, limiting its practical impact.
- The EdDSA forgery is limited to known (msg, sig) pairs.
- The ECDSA verification issue occurs only when the hash contains enough leading zeros, with a probability of 2-32.
What’s new here 4
- Discovered two high-impact cryptographic bugs in the widely used elliptic library.
- Demonstrated EdDSA signature malleability due to a missing scalar range check.
- Showed ECDSA verification can incorrectly reject valid signatures when the hash has leading zeros.
- Provided patches and coordinated disclosure, highlighting the need for continuous cryptographic testing.