Lack of ACL in receiveFromBridge function #750
Labels
2 (Med Risk)
Assets not at direct risk, but function/availability of the protocol could be impacted or leak value
bug
Something isn't working
duplicate-590
partial-75
Incomplete articulation of vulnerability; eligible for partial credit only (75%)
sufficient quality report
This report is of sufficient quality
Lines of code
https://github.com/code-423n4/2024-01-decent/blob/main/src/UTB.sol#L311-L319
Vulnerability details
Impact
In the UTB contract, we have the receiveFromBridge function:
UTB.sol#L311-L319
This function does not have access control, so it can be called by any user, rendering the swapAndExecute function useless, which has access control and fees to be paid:
UTB.sol#L108-L124
Proof of Concept
The following test can be used to validate missing ACL:
Use the following command to run the test:
Tools Used
vscode
Recommended Mitigation Steps
Implement an ACL in the receiveFromBridge function, allowing only access from the bridge adapter.
Assessed type
Access Control
The text was updated successfully, but these errors were encountered: