Skip to content
Business logic Audit finding Intermediate

`createCommonProjectIDAndDeploymentRequest()` hardcodes request id index to 0, leading to lost requests for users

0x73696d616f Follow

Originally disclosed on Sherlock

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

Found by

0x73696d616f

Summary

createCommonProjectIDAndDeploymentRequest() is called by createAgent(), in which the user pays fees to create an agent. The index is supposed to protect the user from overwritting a requestId with the same requestId but different serverURL. However, it is hardcoded to 0.

Root Cause

In BlueprintCore:373, index is 0.

Internal Pre-conditions

None.

External Pre-conditions

None.

Attack Path

  1. User creates an agent for a certain projectId, base64Proposal, server url.
  2. User creates an agent (at the same block) with the same projectId, base64Proposal but different server url.
  3. First request is overwritten.

Impact

First request is overwritten and one of them will not be finalized as submitProofOfDeployment() and submitDeploymentRequest() can only be called once as part of the final steps by the worker. However, the user paid fees for both requests, but only one of them will go through.

PoC

See above.

Mitigation

Index should be increment in a user mapping.

Discussion

sherlock-admin2

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

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.

What is known

A medium-severity business logic bug in Crestal Network. Sherlock made it public on 26 March 2025. Found in the 755 audit contest (finding M-1).

About Business logic

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.

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

What is Business logic?

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.

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.

Business logic flaws

The lesson behind this report.

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.