Skip to content
Crypto Audit finding Intermediate

Signature malleability of EVM’s ecrecover in verify()

The report notes that the contract's use of EVM's ecrecover is susceptible to signature malleability, which could enable replay attacks. However, the contract mitigates this by tracking accepted offers and cancelling them, so the risk is only theoretical unless application logic changes.

Larva Labs Meebits

Originally disclosed on Code4rena

EVM’s ecrecover is susceptible to signature malleability, which allows replay attacks, but that is mitigated here by tracking accepted offers and canceling them (on L645) specifically to prevent replays. However, if any application logic changes, it might make signature malleability a risk for replay attacks.

See reference.

Recommend using OpenZeppelin’s ECDSA library

The original report as published on Code4rena. Images and videos are our own copies; raw HTML is shown as text. View it on Code4rena.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the use of ecrecover without additional checks allows multiple valid signatures for the same message, but the contract's replay protection via offer tracking mitigates the issue.

Impact

Signature malleability could allow replay attacks, but the contract's tracking of accepted offers and cancellation prevents this in the current implementation; the risk may arise if application logic changes.

What the attacker needed

None

The fix

The report recommends using OpenZeppelin’s ECDSA library to avoid signature malleability.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

When a contract checks a digital signature, it uses a function called ecrecover. This function can accept two different signatures for the same message, which means an attacker might reuse a signature that was already used. Here, the contract keeps a record of used offers and cancels them, so the same signature cannot be used twice.

What is Crypto?

Encryption, signatures, randomness or certificate checks that do not protect what they claim to.

More from Larva Labs Meebits

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Cryptographic weaknesses

The lesson behind this report.

Encryption, signatures, randomness or certificate checks that do not protect what they claim to.