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

Albort - The unsafe token-to-validation process #82

Open
sherlock-admin2 opened this issue Sep 25, 2024 · 0 comments
Open

Albort - The unsafe token-to-validation process #82

sherlock-admin2 opened this issue Sep 25, 2024 · 0 comments

Comments

@sherlock-admin2
Copy link

sherlock-admin2 commented Sep 25, 2024

Albort

High

The unsafe token-to-validation process

Summary

In the _initiateBridgeERC20 function, for tokens that are not OptimismMintableERC20, the pairing relationship between _remoteToken and _localToken is not adequately validated. This may lead to the following issues:

Vulnerability Detail

• For non-OptimismMintableERC20 tokens, there is no verification to ensure that _localToken and _remoteToken are correctly paired.
• An attacker could provide an arbitrary _remoteToken address, causing the wrong token to be received on the target chain.

Impact

• Token Loss or Locking: Users may receive incorrect tokens on the target chain, leading to loss of tokens or making them unrecoverable.
• Fraudulent Transfers: Attackers could trick users into bridging tokens to a malicious token contract controlled by the attacker.

Code Snippet

https://github.com/sherlock-audit/2024-08-tokamak-network/blob/main/tokamak-thanos/packages/tokamak/contracts-bedrock/src/universal/StandardBridge.sol#L416

Tool used

Manual Review

Recommendation

Add validation to the _initiateBridgeERC20 function to verify the pairing relationship between _localToken and _remoteToken.
• Maintain a trusted token pair mapping, allowing only token pairs within the mapping to be bridged.

@sherlock-admin4 sherlock-admin4 changed the title Lone Teal Jellyfish - The unsafe token-to-validation process Albort - The unsafe token-to-validation process Oct 12, 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