NFTBridge
60,000 USDC
View results
Submission Details
Severity: low
Invalid

Incorrect access control in startRequestCancellation function

Summary

Incorrect access control in startRequestCancellation function.

Vulnerability Details

The startRequestCancellation function has an incorrect access control modifier. It is currently marked with onlyOwner, which restricts the function to be called only by the contract owner. However, this is not the intended behavior for a bridge contract. The user who initiated the deposit should be able to start the cancellation process for their own request.

Here's the current implementation:

function startRequestCancellation(
uint256[] memory payload,
uint256 nonce
) external onlyOwner {
// Function implementation
}

https://github.com/Cyfrin/2024-07-ark-project/blob/273b7b94986d3914d5ee737c99a59ec8728b1517/apps/blockchain/ethereum/src/Bridge.sol#L226

Impact

The onlyOwner modifier prevents regular users from initiating the cancellation of their own deposit requests.

Tools Used

Manual review

Recommendations

Remove the onlyOwner modifier and implement a check to ensure that the caller is the original depositor of the request being cancelled.

Updates

Lead Judging Commences

n0kto Lead Judge 11 months ago
Submission Judgement Published
Invalidated
Reason: Design choice
Assigned finding tags:

Informational / Gas

Please, do not suppose impacts, think about the real impact of the bug and check the CodeHawks documentation to confirm: https://docs.codehawks.com/hawks-auditors/how-to-determine-a-finding-validity A PoC always helps to understand the real impact possible.

Appeal created

sabit Submitter
11 months ago
n0kto Lead Judge
11 months ago
n0kto Lead Judge 11 months ago
Submission Judgement Published
Invalidated
Reason: Design choice
Assigned finding tags:

Informational / Gas

Please, do not suppose impacts, think about the real impact of the bug and check the CodeHawks documentation to confirm: https://docs.codehawks.com/hawks-auditors/how-to-determine-a-finding-validity A PoC always helps to understand the real impact possible.

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.