10190 matches found
[M1] Incorrect amount of gas sent in _distributeFunds
Lines of code Vulnerability details Impact In case recipients consume more gas than expected the transaction could revert or cost can be too high. Proof of Concept According to the definition of the variable SENDVALUEGASLIMITMULTIPLERECIPIENTS you intend to use all that gas for all recipients. /...
delegated value can go to negative value during subtracting with amount. This will cause issue when delegating amount again.
Lines of code Vulnerability details Impact re-delegating / delegating again could not get actual delegated value. Proof of Concept Tools Used Manual code review. VS code Recommended Mitigation Steps update delegated value to zero when it goes to negative value ifdelegated 0 delegated = 0; --- The...
Add limit on NFT Mining Count
Lines of code Vulnerability details Add limit on NFT Mining Count Context: Description: Mint Function is the most important architectural part of an NFT project. The mint function has no quantity limit. For example, in a 10000 NFT project, 10000 NFT Mints can be triggered at the same time. Howeve...
VotingEscrow: Unsupported fee-on-transfer tokens
Lines of code Vulnerability details Impact In the VotingEscrow contract, if the token is a fee-on-transfer token, the number of tokens received by the contract in the createLock and increaseAmount functions will be less than value. This makes the locked balance recorded by the contract incorrect,...
Wrong values are passed to _checkpoint mess up accounting
Lines of code Vulnerability details Impact The increaseUnlockTime function sends a wrong unlock time to the checkpoint function in the oldLocked variable - the locked variable which is the new LockedBalance is copied into the oldLocked variable which is supposed to be the previous LockedBalance,...
Blocklist contract lack an unblock mechanism
Lines of code Vulnerability details Impact In Blocklist contract, the manager can block a contract from accessing VotingEscrow by calling the block function. If the manager calls the block function on a contract due to some misunderstanding, the manager cannot resume the contract's access to...
Blocking Through Change of Blocklist Could Trap Tokens
Lines of code Vulnerability details Impact In the normal flow, an account that is blocked is protected from having its funds locked by a call to forceUndelegate, as occurs on line 27 of Blocklist.sol. However, this protection could potentially be circumvented if the value of blocklist is changed ...
wrong calculation in MarketFees._getFees
Lines of code Vulnerability details Impact when calculating the royalty the loop start with 1 so creatorShares0 is skipped and not correctly converted his share so he can get more royalty than others creators Proof of Concept Provide direct links to all referenced code in GitHub. Add screenshots,...
Unsafe usage of ERC20 transfer and transferFrom
Lines of code Vulnerability details Impact Some ERC20 tokens functions don't return a boolean, for example USDT, BNB, OMG. So the VotingEscrow contract simply won't work with tokens like that as the token. Proof of Concept The USDT's transfer and transferFrom functions doesn't return a bool, so t...
Missing onlyCreator modifier on minting functions
Lines of code Vulnerability details Impact Missing onlyCreator modifier or any access-control to the NFTCollection.sol mint function makes all of the contract's minting functions absolutely open to any user. Proof of Concept All minting functions in the NFTCollection contract: mintAndApprove...
Functions quitLock and delegate fundamentally change game theory of VoteEscrow
Lines of code Vulnerability details Impact Without delegation it is not possible to remove voting power before the end of a lock. Function quitLock now makes this possible, but it does not just affect the user who quits the lock. Any votes that are delegated to them are temporarily lost from the...
A malicious delegatee can always block the delegator from undelegating the lock
Lines of code Vulnerability details Impact A user who has delegated his/hers voting power to a delegatee can break his/hers delegate only by submitting a lock with a higher expiration time than the delegatee after a successful call to increaseUnlockTime function. After that, he has to call the...
Unsafe use of transfer()/transferFrom() with IERC20
Lines of code Vulnerability details Impact Some tokens do not implement the ERC20 standard properly but are still accepted by most code that accepts ERC20 tokens. For example Tether USDT's transfer and transferFrom functions do not return booleans as the specification requires, and instead have n...
User can have full voting power with virtually no lockup using multiple locks and delegation
Lines of code Vulnerability details Impact User receives voting power of max lock but only locks for a minimal amount of time Proof of Concept In VotingEscrow.solcheckpoint, the duration of the delegatee and the total delegated tokens are used to determine the amount of voting power that a lock...
Malicious creator can create different NFT drop collections with NFTs that will be revealed to correspond to same ipfs token URI
Lines of code Vulnerability details Impact The following createNFTDropCollection function with different name, symbol, and nonce can be called to create different NFT drop collections. function createNFTDropCollection string calldata name, string calldata symbol, string calldata baseURI, bytes32...
USE SAFETRANSFER()/SAFETRANSFERFROM() INSTEAD OF TRANSFER()/TRANSFERFROM()
Lines of code Vulnerability details Impact It is a good idea to add a require statement that checks the return value of ERC20 token transfers or to use something like OpenZeppelinโs safeTransfer/safeTransferFrom unless one is sure the given token reverts in case of a failure. Failure to do so wil...
User Funds are Locked in the VotingEscrow Contract When Delegated User Withdraws
Lines of code Vulnerability details Description There exists an issue when a delegated user attempts to withdraw the locked funds after a lock duration is expired, as a result the funds for the original user who triggered the delegation is lost within the contract. Impact This is an issue because...
Malicious creator can create different NFT collections with NFTs corresponding to same ipfs token URI
Lines of code Vulnerability details Impact A creator can call the following createNFTCollection function with different name, symbol, and nonce to create different NFT collections. function createNFTCollection string calldata name, string calldata symbol, uint256 nonce external returns address...
Operator can use reentrancy within mintFromFixedPriceSale to bypass limitPerAccount.
Lines of code Vulnerability details Impact An operator can pass a contract as the buyReferrer parameter. When distributeFunds is called it sends ETH to the contracts' receive function. After transferring any NFTs the contract may have to another contract it calls mintFromFixedPriceSale passing a...
Upgraded Q -> H from 275 [1660349121925]
Judge has assessed an item in Issue 275 as High risk. The relevant finding follows: --- The text was updated successfully, but these errors were encountered: All reactions...
Upgraded Q -> H from 54 [1660349227136]
Judge has assessed an item in Issue 54 as High risk. The relevant finding follows: --- The text was updated successfully, but these errors were encountered: All reactions...
Upgraded Q -> H from 210 [1660349369322]
Judge has assessed an item in Issue 210 as High risk. The relevant finding follows: --- The text was updated successfully, but these errors were encountered: All reactions...
Take over of AdminRole contract
Lines of code Vulnerability details Impact Any user can call the grantAdmin or revokeAdmin method and take control of the contract. Proof of Concept The grantAdmin and revokeAdmin methods are not protected by any type of authentication restriction, when they should have the onlyAdmin modifier. So...
Take over of MinterRole contract
Lines of code Vulnerability details Impact Any user can call the grantMinter or revokeMinter method and take the mint control of the contract. Proof of Concept The grantMinter and revokeMinter methods are not protected by any type of authentication restriction, when they should have the...
ProxyFactory can circumvent ProxyRegistry
Lines of code Vulnerability details Impact The deployFor function in MIMOProxyFactory.sol can be called directly instead of being called within MIMOProxyRegistry.sol. This results in the ability to create many MIMOProxies that are not registered within the registry. The proxies deployed directly...
If a MIMOProxy owner destroys their proxy, they cannot deploy another from the same address
Lines of code Vulnerability details When deploying a new MIMOProxy, the MIMOProxyRegistry first checks whether a proxy exists with the same owner for the given address. If an existing proxy is found, the deployment reverts: MIMOProxyRegistrydeployFor function deployForaddress owner public overrid...
MIMOProxy: The execute function needs to verify that _initialized > 0
Lines of code Vulnerability details Impact In order to avoid changing the owner during the delegatecall, the execute function of the MIMOProxy contract will check the owner before and after the delegatecall. But if initialized is changed to 0 during the delegatecall process, the MIMOProxy contrac...
MIMOProxy: The transferOwnership function does not update _currentProxies, which causes the core functionality to not work
Lines of code Vulnerability details Impact When the transferOwnership function of the MIMOProxy contract is called, currentProxiesnewOwner is not updated, which causes getCurrentProxynewOwner to return 0 or the wrong MIMOProxy contract address when newOwner executes the function in the current...
MIMOProxy.sol can change owner, but not all contracts expect it. Registry.getCurrentProxy() can give wrong outputs.
Lines of code Vulnerability details Impact Registry.getCurrentProxy is expected to return the individual Proxy.sol for a user EOA. But Proxy.sol can change its owner, and Registry will not know it. Thus Registry.getCurrentProxy only show a deployers, and it means nothing for the project. Also,...
msg.sender lending pool and initiator can be forged in executeOperationin MImoLeverage
Lines of code Vulnerability details Impact Detailed description of the impact of this finding. the function signature is function executeOperation address calldata assets, uint256 calldata amounts, uint256 calldata premiums, address initiator, bytes calldata params external override returns bool...
Incorrect implementation of access control in MIMOProxy:execute
Lines of code Vulnerability details Description There is a function execute in MIMOProxy smart contract. The function performs a delegate call to the user-specified address with the specified data. As an access control, the function checks that either it was called by the owner or the owner has...
When a user is given the owner privilege of multiple MIMOProxy through transferOwnership, the user cannot choose which MIMOProxy to use as the current Proxy
Lines of code Vulnerability details Impact currentProxies is only set when the user calls the deployFor function of the MIMOProxyRegistry contract, function deployForaddress owner public override returns IMIMOProxy proxy IMIMOProxy currentProxy = currentProxiesowner; // Do not deploy if the proxy...
Double spend in execute function from the MIMOProxy
Lines of code Vulnerability details There is batch function in MIMOProxy smart contract. The function is inherited from the BoringBatchable contract. The function accept an array of bytes - call parameters, and do delegate call to addressthis for each of the call parameters. There also is execute...
Manager is able to use swapData.dexTxData to Perform Reentrancy
Lines of code Vulnerability details Impact Reentrancy here allows a manager to perform multiple operations on a given pool beyond the max limit. Proof of Concept A Manager, using swapData.dexTxData, can reenter MIMO actions performed on the vault he is managing. The manager deploys a FAKE token a...
Delegate call can manipulate minGasReserve and the _permissions mapping.
Lines of code Vulnerability details Impact When the proxy delegatecalls the target contract the target contracts code runs in the proxyโs storage. This means the target code has access to all of proxyโs storage including internal mappings. As a result, the target contracts code can manipulate...
The lazy update of _currentProxies results in non-owners being able to execute functions that require owner privileges
Lines of code Vulnerability details Impact In the MIMOProxyRegistry contract, the getCurrentProxy function returns the address of the mimoProxy contract corresponding to the owner's address in currentProxies. function getCurrentProxyaddress owner external view override returns IMIMOProxy proxy...
Malicious manipulation of gas reserve can deny access to MIMOProxy
Lines of code Vulnerability details The MIMOProxy contract defines a minGasReserve value as a storage variable: MIMOProxy.solL18: /// @inheritdoc IMIMOProxy uint256 public override minGasReserve; The execute function uses this minGasReserve value to calculate a gas stipend to provide to the targe...
Unchecked Call Return Value
Lines of code Vulnerability details Impact The return value of a message call is not checked. Execution will resume even if the called contract throws an exception. If the call fails accidentally or an attacker forces the call to fail, this may cause unexpected behaviour in the subsequent program...
## [H2] Multicall can be called by a malicious contract after executing a malicious delegatecall
Lines of code Vulnerability details Impact Multicall can be called though a malicious delegate call controlling all function in a vault. PoC This is related to a bug I had reported MIMOProxy can be PWNED by a malicious delegate call where I explain that storage variables can be set in delegate...
The MIMOVaultActions contract cannot withdraw assets to the user
Lines of code Vulnerability details Impact The MIMOVaultActions contract provides users with the functions of depositing, withdrawing and borrowing assets, which is called by the delegatecall of the MIMOProxy contract. But when borrowing or withdrawing assets, there is no function provided to giv...
Manager is able to charge an excessive fee by taking out a larger than necessary flash loan
Lines of code Vulnerability details Impact The manager's fee is determined by the flash loan amount he takes out. A manager can take out a large flash loan to increase the fee due to him. Proof of Concept Manager needs to rebalance a vault. Manager only needs 50k flash loan. Manager takes out 2m...
Malicious targets can manipulate MIMOProxy permissions
Lines of code Vulnerability details The MIMOProxy contract stores per-caller, per-target, per-selector permissions in a nested internal mapping. MIMOProxy.solL21: /// INTERNAL STORAGE /// /// @notice Maps envoys to target contracts to function selectors to boolean flags. mappingaddress =...
QA Report
Prevent possible future storage collisions The target action contracts of MIMOProxy.sol use storage slot 0 for immutable addresses, which doesn't currently pose an issue; however, if in future additional contracts are added which allow this slot in storage to be modified then it could open the...
vaultOwner Can Front-Run rebalance() With setAutomation() To Lower Incentives
Lines of code Vulnerability details Impact A vaultOwner who is "not confident enough in ourselves to stay up-to-date with market conditions to know when we should move to less volatile collateral to avoid liquidations." They can open their vault to other users who pay attention to the markets and...
[H3] Persisted msg.value in a loop of delegate calls can be used to drain ETH from your proxy
Lines of code Vulnerability details Impact msg.value in a loop can be used to drain proxy funds PoC While BoringBatchable is out of the scope, this bug affects seriously MIMOProxy as it inherits. Some time ago I read a report about an auditor called samczsung . I believe that you are having the...
Overwriting storage slots in MIMOProxy
Lines of code Vulnerability details Impact The MIMOProxy allows you to delegate a call to another contract from a permission of owner. With a delegate call, the entire storage layout is kept the same as it is on MIMOProxy. It means that if the delegate call will be made for smart contract with...
Inadequate transferOwnership function prevents new owner from accessing funds
Lines of code Vulnerability details Description There are two sources of truth for identifying the account that owns a given MIMOProxy: 1. MIMOProxy.owner 2. MIMOProxyRegistry.getCurrentProxyaddress The first source of truth is only used within the proxy contract itself, and the second source of...
Caller is able to set management params in a MIMOManagedRebalance proxy he doesn't own
Lines of code Vulnerability details Impact A caller is able to set management params with any MIMOManagedRebalance proxy as long as the caller is a vault owner, the caller has deployed a proxy, and the caller is set as a manager of said vault. Proof of Concept Using the MIMOProxy's multi-call, ca...
[H1] MIMOProxy can be PWNED by malicious delegate call
Lines of code Vulnerability details Impact PBR proxy owner change protection can bypassed / DoS PoC PRBProxy has a protection to prevent malicious delegatecall to overwrite owner. function executeaddress target, bytes calldata data public payable override returns bytes memory response ... ... //...
rbData.toCollateral address can be different than the token address set in swapData.dexTxData.
Lines of code Vulnerability details Impact rbData.toCollateral address can be different than the token address set in swapData.dexTxData. A manager can supply toCollateral address of the collateral within the contract but supply a different address in swapParams.dexTxData such that the contract...