Tadle

Tadle
DeFi
30,000 USDC
View results
Submission Details
Severity: high
Invalid

Lack of Account Address Validation in `tillIn` Function

Github

  • https://github.com/Cyfrin/2024-08-tadle/blob/04fd8634701697184a3f3a5558b41c109866e5f8/src/core/TokenManager.sol#L56

Summary

The tillIn function within the TokenManager contract allows users to transfer tokens from their accounts to a capital pool. However, the function does not validate whether the provided _accountAddress parameter matches the caller's (msg.sender) address. This lack of validation opens up potential security vulnerabilities, including unauthorized fund transfers and inconsistent accounting practices.

Vulnerability Details

The function allows users to transfer tokens to a capital pool, but it does not validate whether _accountAddress matches msg.sender. This omission means that any user can specify an arbitrary _accountAddress, potentially transferring tokens on behalf of another user without their authorization. An attacker could transfer tokens from another user's account without their consent. If the _accountAddress does not match msg.sender, it could result in discrepancies between the funds transferred and the account being credited or debited, leading to potential accounting errors.

Impact

The lack of validation for _accountAddress in the tillIn function could lead to significant security vulnerabilities, including unauthorized access to user funds and inconsistencies in account balances. The severity of this issue is high, as it directly impacts the integrity and security of user assets managed by the contract.

Tools Used

Manual Review

Recommendations

To mitigate the risks associated with this vulnerability, it is recommended to implement a validation check to ensure that _accountAddress matches msg.sender. This will prevent unauthorized users from interacting with accounts other than their own.

Updates

Lead Judging Commences

0xnevi Lead Judge
11 months ago
0xnevi Lead Judge 10 months ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement

Support

FAQs

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