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

shaflow01 - The contract should immediately revoke the authorization, rather than waiting for the next interaction. #226

Open
sherlock-admin2 opened this issue Nov 13, 2024 · 0 comments

Comments

@sherlock-admin2
Copy link
Contributor

sherlock-admin2 commented Nov 13, 2024

shaflow01

Medium

The contract should immediately revoke the authorization, rather than waiting for the next interaction.

Summary

The contract should immediately revoke the authorization, rather than waiting for the next interaction.

Root Cause

https://github.com/sherlock-audit/2024-11-telcoin/blob/main/telcoin-audit/contracts/swap/AmirX.sol#L195

Internal pre-conditions

No response

External pre-conditions

No response

Attack Path

  1. The allowance is not immediately cleared after calling the aggregator swap.

  2. Malicious users can abuse the allowance by using part of the aggregator functions.

Impact

A malicious user could manipulate the aggregator to exploit the allowance.

PoC

No response

Mitigation

The contract should immediately revoke all allowances after the swap is completed.

@sherlock-admin3 sherlock-admin3 changed the title Rough Cornflower Chipmunk - The contract should immediately revoke the authorization, rather than waiting for the next interaction. shaflow01 - The contract should immediately revoke the authorization, rather than waiting for the next interaction. Nov 17, 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