You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 26, 2023. It is now read-only.
github-actionsbot opened this issue
Feb 21, 2023
· 0 comments
Labels
DuplicateA valid issue that is a duplicate of an issue with `Has Duplicates` labelMediumA valid Medium severity issueRewardA payout will be made for this issue
Each bounty is only allowed to have openQTokenWhitelist.TOKEN_ADDRESS_LIMIT() number of tokens. Attacker can frontrun the bounty owner funding request in a way which DOS bounty owner funding request
Vulnerability Detail
A bounty was created at address A
Lets say for simplicity openQTokenWhitelist.TOKEN_ADDRESS_LIMIT() is set to 1
Ideally only one token should be allowed for funding
Bounty owner tries funding token X
Attacker immediately frontrun this request and instead fund a malicious token X. Since TOKEN_ADDRESS_LIMIT is not reached funding is accepted
if (!isWhitelisted(_tokenAddress)) {
require(
!tokenAddressLimitReached(_bountyAddress),
Errors.TOO_MANY_TOKEN_ADDRESSES
);
}
Bounty owner funding from Step 4 is reverted since limit is already reached
Bounty owner can have the limit increased but Attacker can again frontrun, making sure that bounty owner is never fund the bounty
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
DuplicateA valid issue that is a duplicate of an issue with `Has Duplicates` labelMediumA valid Medium severity issueRewardA payout will be made for this issue
csanuragjain
medium
DOS bounty funding
Summary
Each bounty is only allowed to have
openQTokenWhitelist.TOKEN_ADDRESS_LIMIT()
number of tokens. Attacker can frontrun the bounty owner funding request in a way which DOS bounty owner funding requestVulnerability Detail
A
openQTokenWhitelist.TOKEN_ADDRESS_LIMIT()
is set to 1Impact
Attacker can DOS bounty owner from funding
Code Snippet
https://github.com/sherlock-audit/2023-02-openq/blob/main/contracts/DepositManager/Implementations/DepositManagerV1.sol#L45-L50
Tool used
Manual Review
Recommendation
Funding should only be allowed for Whitelisted token. If user is trying to fund non whitelisted token then owner should first whitelist that token
Duplicate of #530
The text was updated successfully, but these errors were encountered: