Zero days without incidents in the DeFi space. This time the vulnerability was discovered in a widely used ‘elliptic library.’
What makes matters worse – its exploitation could lead to hackers taking control of users’ private keys and draining wallets.
All through a simple fraudulent message signed by a user. Is this a critical issue?
The first thing to consider is the fact that libraries like elliptic provide developers with ready-made code components.
This means that instead of writing the code from scratch and checking it as they go, developers just borrow the elements they need.
While it’s considered to be a safer practice, since the libraries are continuously used and tested, this also increases the risks if one vulnerability gets through.
Elliptic library is used extensively across the JavaScript ecosystem. It powers cryptographic functions in many well-known blockchain projects, web applications and security systems.
According to NPM statistics, the package containing the error is downloaded approximately 12–13 million times weekly, with over 3,000 projects directly listing it as a dependency.
This broad usage implies that the vulnerability potentially affects a vast number of applications – especially cryptocurrency wallets, blockchain nodes and electronic signature systems – as well as any service relying on ECDSA signatures through elliptic, especially when handling externally provided input.
This vulnerability allows remote attackers to fully compromise sensitive data without proper authorization.
That’s why the issue received an extremely high severity rating – approximately nine out of 10 on the CVSS scale.
It’s important to point out that exploiting this vulnerability requires a very specific sequence of actions and the victim must sign arbitrary data provided by the attacker.
That means that some projects may remain safe, for example, if an application only signs predetermined internal messages.
Still, many users don’t pay as much attention when signing messages via crypto wallets as they do when signing a transaction.
Whenever a Web 3.0 site asks users to sign terms of service, users often neglect to read them.
Similarly, users might quickly sign a message for an airdrop without fully understanding the implications.
Technical details
The problem comes from not handling errors properly during the creation of ECDSA (Elliptic Curve Digital Signature Algorithm) signatures.
ECDSA is commonly used to confirm that messages, like blockchain transactions, are genuine.
To create a signature, you need a secret key – only the owner knows it – and a unique random number called a ‘nonce.’
If the same nonce is used more than once for different messages, someone could figure out the secret key using math.
Normally, attackers can’t figure out the private key from one or two signatures because each one uses a unique random number (nonce).
But the elliptic library has a flaw – if it gets an odd type of input (like a special string instead of the expected format), it could create two signatures with the same nonce for different messages.
This mistake could reveal the private key, which should never happen in proper ECDSA use.
To exploit this vulnerability, an attacker needs two things.
With these two signatures, the attacker can compute the user’s private key, gaining full access to funds and actions associated with it. Detailed information is available in the GitHub Security Advisory.
Exploitation scenarios
Attackers may exploit this vulnerability through various methods, including the following.
A particularly concerning aspect is users’ generally lax attitude toward signing messages compared to transactions.
Crypto projects frequently ask users to sign terms of service or airdrop participation messages, potentially making exploitation easier.
So, think about it – would you sign a message to claim free tokens? What if that signature could cost you your entire crypto balance?
Recommendations
Users must promptly update all applications and wallets that utilize the elliptic library for signatures to the latest secure version.
Exercise caution when signing messages, particularly from unfamiliar or suspicious sources.
Developers of wallets and applications should verify their elliptic library version.
If any users could be affected by the vulnerable version, developers must inform them about the urgent need for updating.
Gleb Zykov is the co-founder and CTO of HashEx Blockchain Security. He has more than 14 years of experience in the IT industry and over eight years in internet security, as well as a strong technical background in blockchain technology (Bitcoin, Ethereum and EVM-based blockchains).
Check Latest Headlines on HodlXFollow Us on Twitter Facebook Telegram
Check out the Latest Industry AnnouncementsGenerated Image: DALLE3
The post HashEx Security Alert – A Single Signature Could Drain Your Wallet appeared first on The Daily Hodl.