Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0xBhumii - Lack of Validation for Recipient Address in InfernalRiftBelow #787

Open
sherlock-admin4 opened this issue Sep 15, 2024 · 0 comments

Comments

@sherlock-admin4
Copy link
Contributor

sherlock-admin4 commented Sep 15, 2024

0xBhumii

Medium

Lack of Validation for Recipient Address in InfernalRiftBelow

Summary

The thresholdCross function and its related internal functions (_thresholdCross721, _thresholdCross1155) fail to validate the recipient address. This can lead to tokens being sent to invalid addresses, resulting in a permanent loss of assets. Validation of the recipient address should be implemented to avoid this issue.

Vulnerability Detail

The contract allows for the transfer of ERC721 and ERC1155 tokens using the thresholdCross function, where the recipient address is passed as an argument. However, there is no check to ensure that the recipient address is valid or non-zero. If an invalid address is provided , tokens could be lost permanently, as they would be sent to a non-recoverable address. This is particularly risky in cross-chain transfers or bridging mechanisms.

Impact

Tokens can be transferred to invalid addresses, leading to a permanent loss of assets. Since the contract is designed to handle cross-chain transfers, losing tokens in such a manner could severely impact the security and functionality of the system.

Code Snippet

https://github.com/sherlock-audit/2024-08-flayer/blob/main/moongate/src/InfernalRiftBelow.sol#L234C1-L321C1

Tool used

Manual Review

Recommendation

Add validation to ensure that the recipient address is valid.

@sherlock-admin2 sherlock-admin2 changed the title Blunt Daffodil Iguana - Lack of Validation for Recipient Address in InfernalRiftBelow 0xBhumii - Lack of Validation for Recipient Address in InfernalRiftBelow Oct 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant