Skip to content
Smart contracts Audit finding Intermediate

Signatures missing some parameters being vulnerable to attackers using them coupled with malicious parameters

The smart contract functions that create agents with a signature do not include all parameters in the signed data, such as tokenId, privateWorkerAddress, and tokenAddress. An attacker who obtains a user's signature from the ERC4337 mempool can submit it with different values, forcing the user to create an agent with an unintended token or worker, or to pay higher fees.

0x73696d616f Follow

Originally disclosed on Sherlock

Source: https://github.com/sherlock-audit/2025-03-crestal-network-judging/issues/225

Found by

0x73696d616f

Summary

createAgentWithSigWithNFT() for example signs projectId, base64RecParam, serverURL. However, it does not sign privateWorkerAddress or tokenId. This is an issue because although Base has a private mempool, the protocol integrates with Biconomy, which leverages ERC4337 and has a mempool for bundlers. Hence, the signatures will be available in the mempool and anyone can fetch them and submit it directly to base with other malicious tokenId or privateWorkerAddress.

Thus, users can be forced to create agents with token ids they didn't intend to use or use invalid worker addresses, DoSing them. Workers have incentive to do this as they can censor other workers this way from using other workers and only they will be able to make the deployments, censoring other workers. The protocol intends to benefit workers from their work, so they have incentive to do so.

If [createAgentWithTokenWithSig()](https://github.com/sherlock-audit/2025-03-crestal-network/blob/main/crestal-omni-contracts/src/BlueprintCore.sol#L491), the token address used can be another one that has a bigger cost and users end up paying more.

Root Cause

In createAgentWithSigWithNFT() and similar, tokenAddress, tokenId, privateWorkerAddress are not signed.

Internal Pre-conditions

None.

External Pre-conditions

None.

Attack Path

  1. User sends signature to be used on createAgentWithSigWithNFT() or createAgentWithTokenWithSig() to the offchain protocol, which forwards it to Biconomy, adding the user operation to the mempool.
  2. Attacker picks up the signature from the eip4337 mempool and submits the onchain transaction with other malicious inputs.

Impact

Worker censors other workers, DoSes users, makes them pay fees without getting services and ultimately forces users to use the attacker worker's services, who gets illegitimate fees. Or, attacker steals tokens from users by specifying a different token address. Or, another token id ownership is used.

PoC

Here is how the biconomy bundler works (which is the same as the typical bundler):

Aggregating userOps in an alternative mempool to normal Ethereum Transactions

Attacker can become a bundler and listen to the same mempool and perform the attack.

Mitigation

Sign all parameters.

Discussion

sherlock-admin2

The protocol team fixed this issue in the following PRs/commits: https://github.com/crestalnetwork/crestal-omni-contracts/pull/18

The original report as published on Sherlock, by 0x73696d616f. Images and videos are our own copies; raw HTML is shown as text. View it on Sherlock.

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

The signature scheme does not include all parameters that affect the outcome of the function call, allowing tampering with unsigned parameters.

Impact

Workers can censor other workers, users can be forced to pay fees without receiving services, and attackers can steal tokens by specifying a different token address.

What the attacker needed

User submits a signature to the offchain protocol; Attacker monitors the ERC4337 mempool

The fix

The protocol team fixed this issue by signing all parameters.

How it was found

  1. User sends a signature for createAgentWithSigWithNFT or createAgentWithTokenWithSig to the offchain protocol, which forwards it to Biconomy and adds the user operation to the mempool.
  2. Attacker picks up the signature from the ERC4337 mempool and submits the onchain transaction with other malicious inputs.

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 you sign a message to approve an action, the signature should cover every detail of that action. Here, some details were left out, so someone else could take your signature and use it with different details. This could make you pay more or use a worker you didn't choose.

What is Smart contracts?

Flaws in on-chain code that let an attacker drain funds, freeze them or break the protocol's accounting.

More by 0x73696d616f

View all

172 more disclosed reports, best first.

More from Crestal Network

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Smart contract vulnerabilities

The lesson behind this report.

Flaws in on-chain code that let an attacker drain funds, freeze them or break the protocol's accounting.