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

Fix: Potential transfer bypass vulnerability #257

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

rickymcalister
Copy link

The current validateTransfer check appears to have a subtle flaw; it only checks if msg.sender is different from tx.origin. It doesn't check if msg.sender is a contract.

A malicious EOA could potentially create a contract that simply calls the transfer function. Because msg.sender (the malicious contract's address) would be different from tx.origin (the malicious EOA's address), the allowlist check for msg.sender would be bypassed. This means the malicious EOA could effectively transfer tokens even if their contract (and therefore indirectly, themselves) is not on the allowlist.

The modifier should explicitly check if msg.sender is an EOA before skipping the allowlist check.

@rickymcalister rickymcalister requested a review from a team as a code owner January 11, 2025 03:24
@rickymcalister rickymcalister changed the title Ricky fix transfer bypass vulnerability Fix: Potential transfer bypass vulnerability Jan 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant