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

Fee Distribution Re-Entrancy #11

Open
code423n4 opened this issue May 7, 2021 · 0 comments
Open

Fee Distribution Re-Entrancy #11

code423n4 opened this issue May 7, 2021 · 0 comments
Labels
2 (Med Risk) bug Something isn't working Confirmed

Comments

@code423n4
Copy link
Contributor

Handle

0xsomeone

Vulnerability details

Impact

The distribute function of NFTXFeeDistributor has no access control and will invoke a fallback on the fee receivers, meaning that a fee receiver can re-enter via this function to acquire their allocation repeatedly potentially draining the full balance and sending zero amounts to the rest of the recipients.

Proof of Concept

A smart contract with a malicious receiveRewards function can re-enter the distribute function with the same vault ID thereby causing the exploit.

Tools Used

Manual review.

Recommended Mitigation Steps

Re-entrancy protection should be incorporated into the distribute function. I should note that a seemingly innocuous contract can cause this re-entrancy by simply asking the owners of the project to include an upgrade-able contract that is then replaced for a malicious implementation.

@code423n4 code423n4 added 2 (Med Risk) bug Something isn't working labels May 7, 2021
code423n4 added a commit that referenced this issue May 7, 2021
@0xKiwi 0xKiwi closed this as completed May 20, 2021
@cemozerr cemozerr reopened this May 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2 (Med Risk) bug Something isn't working Confirmed
Projects
None yet
Development

No branches or pull requests

3 participants