Lucene search
+L
Code423n4Recent

10190 matches found

Code423n4
Code423n4
added 2022/06/18 12:0 a.m.9 views

Upgraded Q -> M from 117 [1655579798819]

Judge has assessed an item in Issue 117 as Medium risk. The relevant finding follows: Don't use send / transfer to send ETH This is low severity but you should avoid these and use call --- The text was updated successfully, but these errors were encountered: All reactions...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2022/06/18 12:0 a.m.16 views

It lacks slippage control when swapping tokens

Lines of code Vulnerability details Impact In balancer document: In the above example code, we set our tokenBAL limit to 0, which means we are willing to accept 100% slippage on our trade. That is generally a very bad idea It lacks slippage control when calling BALANCERVAULT.swap, making it suffe...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2022/06/18 12:0 a.m.11 views

Attacker can deposit for MyStrategy in AuraLocker make it unable to withdraw all.

Lines of code Vulnerability details Impact Function withdrawToVault in BaseStrategy will withdraw all funds from strategy to vault, it uses an internal function withdrawAll in MyStrategy. In this function, there is a check that no locked balance is still in AuraLocker. An attacker can keep deposi...

6.7AI score
SaveExploits0
Code423n4
Code423n4
added 2022/06/18 12:0 a.m.16 views

Upgraded Q -> M from 119 [1655579861612]

Judge has assessed an item in Issue 119 as Medium risk. The relevant finding follows: L01: Use .call instead of .send Line References Description It is recommended to use call instead of send because the former fowards all remaining gas with the call, while the latter has a gas limit of 2300. Thi...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2022/06/18 12:0 a.m.9 views

Vaults are vulnerable to sandwich attacks due to missing slippage checks

Lines of code Vulnerability details Impact Swaps in the new Beefy Vault can have almost all funds taken via MEV sandwich attacks because there is no slippage control Proof of Concept The last argument to addliquidity is the minimum amount to mint, which is zero here: File:...

7AI score
SaveExploits0
Code423n4
Code423n4
added 2022/06/18 12:0 a.m.13 views

harvest() can be frontrun, to make the AURABAL token stuck

Lines of code Vulnerability details Impact In the LOCKER contract https://etherscan.io/address/0x3Fa73f1E5d8A792C80F426fc8F84FBF7Ce9bBCACcode anyone can call getreward for any account, therefore an attacker can frontrun an authorized actor, by calling getrewardaddressmyStrategy, before the harves...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2022/06/18 12:0 a.m.12 views

YearnCurveVaultOperator's withdrawETH doesn't check for minAmountOut

Lines of code Vulnerability details withdrawETH effectively do not control the output token result of withdrawal as Vault token is ETH in this case, while WETH balance is controlled and no ETH - WETH deposit is done. I.e. any calls to withdrawETH with non-zero minAmountOut will fail as WETH balan...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2022/06/18 12:0 a.m.9 views

Division by 0

Lines of code Vulnerability details Division by 0 can lead to accidentally revert, An example of a similar issue - code-423n4/2021-10-defiprotocol-findings84 Code instances: https://github.com/code-423n4/2022-06-nested/tree/main/contracts/operators/Beefy/lp/BeefyZapBiswapLPVaultOperator.solL286...

7AI score
SaveExploits0
Code423n4
Code423n4
added 2022/06/18 12:0 a.m.16 views

Badger rewards from Hidden Hand can permanently prevent Strategy from receiving bribes

Lines of code Vulnerability details Impact If the contract receives rewards from the hidden hand marketplace in BADGER then the contract tries to transfer the same amount of tokens twice to two different accounts, once with sendBadgerToTree in MyStrategy and again with processExtraToken in the...

7AI score
SaveExploits0
Code423n4
Code423n4
added 2022/06/18 12:0 a.m.8 views

Vulnerable OZ version [email protected] used

Lines of code Vulnerability details Impact An outdated and vulnerable OpenZeppelin version 3.4.0 is used. This dependency has a known high severity vulnerability: describes the possibility of initializer protected functions to be called twice, this would affect the MyStrategy.sol contract. See...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2022/06/18 12:0 a.m.15 views

Low Value Definition On The Slippage

Lines of code Vulnerability details Impact Trades can happen at a bad price and lead to receiving fewer tokens than at a fair market price. The attacker's profit is the protocol's loss. Proof of Concept MyStrategy contract has low slippage checks which can lead to being vulnerable to sandwich...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2022/06/18 12:0 a.m.10 views

_harvest() vulnerable to sandwich attacks due to missing slippage checks

Lines of code Vulnerability details Impact All funds that should have been harvested can be taken via MEV sandwich attacks because there is no slippage control. Proof of Concept The two swap calls pass zero as the third argument: File: contracts/MyStrategy.sol 1 249 uint256 balEthBptEarned =...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2022/06/18 12:0 a.m.10 views

Yield may be stolen by MEV bot by sandwiching harvest()

Lines of code Vulnerability details Impact Yield may be stolen by MEV bot by sandwiching harvest. Because of minimum output amount of swapping is set to 0. Which mean MEV bot can pump price of AURA token to the highest price before your strategy swap to let you buy AURA token at an incredibly hig...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2022/06/18 12:0 a.m.14 views

The withdrawal safety check in _withdrawSome() seems unreasonable

Lines of code Vulnerability details Impact The withdrawal safety check in seems unreasonable. Proof of Concept I don’t understand why max = amount99.8% need to be confirmed. max should be larger than amount. And amount function withdrawSomeuint256 amount internal override returns uint256 uint256...

7.1AI score
SaveExploits0
Code423n4
Code423n4
added 2022/06/18 12:0 a.m.13 views

Claiming BADGER bribes and sweeping BADGER rewards tokens is broken

Lines of code Vulnerability details Impact Twice the amount of BADGER tokens are sent to badgerTree within the MyStrategy.sendBadgerToTree function. Due to insufficient BADGER tokens, this will break the following functionalities: MyStrategy.sweepRewardToken L107-L113 function...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2022/06/18 12:0 a.m.14 views

Upgraded Q -> M from 47 [1655572104366]

Judge has assessed an item in Issue 47 as Medium risk. The relevant finding follows: 1. Unsafe use of transfer/transferFrom with IERC20 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...

7.1AI score
SaveExploits0
Code423n4
Code423n4
added 2022/06/18 12:0 a.m.14 views

Upgraded Q -> M from 189 [1655579836940]

Judge has assessed an item in Issue 189 as Medium risk. The relevant finding follows: N02 Using send to send ETH could run out of gas. You have to be sure of the logic of the recipient. --- The text was updated successfully, but these errors were encountered: All reactions...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2022/06/18 12:0 a.m.15 views

Upgraded Q -> M from 91 [1655579814367]

Judge has assessed an item in Issue 91 as Medium risk. The relevant finding follows: use call instead of send affected code: Use of transfer might render ETH impossible to withdraw because after istanbul hardfork , there is increases in the gas cost of the SLOAD operation and therefore breaks som...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2022/06/18 12:0 a.m.9 views

VULNERABLE VERSION OF OPEN-ZEPPELIN CAN LEAD TO INITIALIZER() MALFUNCTION

Lines of code Vulnerability details VULNERABLE VERSION OF OPEN-ZEPPELIN CAN LEAD TO INITIALIZER MALFUNCTION Openzeppelin contracts are used, and as indicated in brownie-config.yaml, the version 3.4.0 of the openzeppelin-contracts-upgradeable dependency is used. The openzeppelin contracts from...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2022/06/18 12:0 a.m.13 views

Division by 0 can lead to accidentally revert

Lines of code Vulnerability details Division by 0 can lead to accidentally revert, An example of a similar issue - code-423n4/2021-10-defiprotocol-findings84 Code instances: https://github.com/code-423n4/2022-06-nested/tree/main/contracts/operators/Beefy/lp/BeefyZapBiswapLPVaultOperator.solL286...

7AI score
SaveExploits0
Code423n4
Code423n4
added 2022/06/17 12:0 a.m.15 views

TimelockControllerEmergency: The sent ether may be locked in the OwnerProxy contract

Lines of code Vulnerability details Impact The call function in the TimelockControllerEmergency contract will send ether to the OwnerProxy contract, and the OwnerProxy contract will delegatecall the script contract. The two existing script contracts will neither use ether nor withdraw ether, whic...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2022/06/17 12:0 a.m.13 views

Reward token (auraBal) can be locked in the strategy

Lines of code Vulnerability details Impact Detailed description of the impact of this finding. getRewardaddress account function of Aura Locker is an external function therefore can be called by anyone by passing in the address of strategy and transferring the rewards to the strategy. harvest...

7AI score
SaveExploits0
Code423n4
Code423n4
added 2022/06/17 12:0 a.m.14 views

receive function is unrestricted

Lines of code Vulnerability details Impact The receive function has not placed any restriction which means if any user accidentally sends any ETH to this contract then it is permanently freezed until timelock decides to release it by creating and approving a new transaction on timelock which...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2022/06/17 12:0 a.m.12 views

destroy function doesn't check if exitFees is set

Lines of code Vulnerability details Impact This issue might lead to 0 amountFees Proof of Concept The destroy function does not check if exitFees is set, therefore in a scenario wherein the owner does not set the value of exitFees, its default value would be 0. In line 264 we can see: uint256...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2022/06/17 12:0 a.m.14 views

Attacker can grief users from withdrawing their tokens and causing users to loose money

Lines of code Vulnerability details Impact balance of this contract of vault tokens in the require statement can stop users from withdrawing their tokens 2 issues: 1. vaultbalancebefore= balance of this contract from a vault tokens vaultamount=vaultbalancebefore- balance of vault right then when...

6.7AI score
SaveExploits0
Code423n4
Code423n4
added 2022/06/17 12:0 a.m.17 views

Owner can sweep any token

Lines of code Vulnerability details Impact Admin can sweep any token even if the token is in use by the contract. Ideally only non blacklisted tokens should be allowed by unlockTokens function function unlockTokensIERC20 token external override onlyOwner uint256 amount = token.balanceOfaddressthi...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2022/06/17 12:0 a.m.15 views

attacker can lock all the auraBAL rewards in contract address forever and they won't be accessible

Lines of code Vulnerability details Impact auraBAL token is in protected tokens list, so it can't be transferred to bribeProcessor by using sweepRewardToken. function harvest is supposed to call LOCKER.getReward and then swap received auraBAL rewards and deposit them in LOCKER, but it only can do...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2022/06/17 12:0 a.m.10 views

Functions in OperatorSripts.sol can be called by anyone

Lines of code Vulnerability details Impact The functions defined in OperatorScripts contract are external functions without any other access control. So anyone can add operators for OperatorResolver.getOpertor which is called in MixinOperatorResolver to use in callOperator, which is called when...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2022/06/17 12:0 a.m.12 views

DOS on operation execution

Lines of code Vulnerability details Impact A malicious proposer can keep on cancelling all pending operations so that none of the transactions get executed. Admin also has no way to remove the malicious proposer Proof of Concept 1. Proposer A calls schedule function to schedule an operation 2...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2022/06/16 12:0 a.m.13 views

Missing reentrancy protections

Lines of code Vulnerability details Impact The files below contain both deposit and withdraw functions which seem re-entrable at the point of calls that transfer tokens. The functions do not fully follow a checks-effects-interactions pattern, thus they can be re-entered multiple times. Depending ...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2022/06/16 12:0 a.m.13 views

Malicious Owner can steal all user funds

Lines of code Vulnerability details Submitting as med risk because it would require malicious multisig, but there should never be absolute trust in any party especially when there's no reason fees would ever need to be that high anyways Impact Owner steals all of user funds Proof of Concept...

6.7AI score
SaveExploits0
Code423n4
Code423n4
added 2022/06/16 12:0 a.m.11 views

Lack of Two-Step Process for Critical Operations

Lines of code Vulnerability details Impact This function transfers/renounce the ownership of the contract in a single step. There is no way to reverse a one-step transfer of ownership to an address without an owner. This would not be the case if ownership were transferred through a two-step proce...

7.2AI score
SaveExploits0
Code423n4
Code423n4
added 2022/06/16 12:0 a.m.14 views

There is no check that in setBribesProcessor() the value of newBribesProcessor is not 0x0, fund will be lost or locked if by mistake value set to 0x0

Lines of code Vulnerability details Impact Fund can be lost if the value of bribesProcessor set to 0x0 address and there is no check in the setBribesProcessor to prevent it. sendTokenToBribesProcessor sends bribes to bribesProcessor and there is no check there too. so if by mistake the value of...

6.7AI score
SaveExploits0
Code423n4
Code423n4
added 2022/06/16 12:0 a.m.14 views

All withdrawal functionality is paused when contract is paused

Lines of code Vulnerability details Impact When the strategy contract is paused, all withdrawal functionality will be paused. Based on the comments in MyStrategy.sol and baseStrategy.sol, withdrawToVault should not be affected by the pause functionality. This is not the case due to the...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2022/06/16 12:0 a.m.29 views

no slippage check

Lines of code Vulnerability details in the function swapAndAddLiquidity it makes a call swapExactTokensForTokens with slippage hard coded to 1 this could lead to the user receiving much less tokens than expected due to being frontrun / sandwiched which will result in a loss of funds recommend...

6.7AI score
SaveExploits0
Code423n4
Code423n4
added 2022/06/16 12:0 a.m.11 views

amountAMin and amountBMin set to 1

Lines of code Vulnerability details in the function swapAndAddLiquidity it makes a call addLiquidity with amountAMin and amountBMin hard coded to 1 recommend specifying a proper amountAMin and amountBMin rather than 1 --- The text was updated successfully, but these errors were encountered: All...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2022/06/16 12:0 a.m.13 views

Update initializer modifier to prevent reentrancy during initialization

Lines of code Vulnerability details Proof of Concept The code uses: @openzeppelin-contracts-upgradeable=OpenZeppelin/[email protected]/contracts/ This dependency have a known high severity vulnerability: Which makes the main contract in this audit "MyStrategy" vulnerable...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2022/06/16 12:0 a.m.10 views

fund lose because of the direct funds transfer to vault address and cause big balance() to totalSupply() ratio and cause big division error in _mintSharesFor() (this is in previous contest scope)

Lines of code Vulnerability details Impact Attacker can cause balance / totalSupply ratio to go as high as he want and then because of rounding error in mintSharesFor lower amount of share would be mint for users. if totalSupply is 0 attacker can directly transfer tokens to contract address and...

6.7AI score
SaveExploits0
Code423n4
Code423n4
added 2022/06/16 12:0 a.m.14 views

reentrancy by _harvest() and _deposit() code in the middle of claimBribesFromHiddenHand() external calls to tokens and change balances of AURA token so claimBribesFromHiddenHand() make wrong transfers and fund would be lost

Lines of code Vulnerability details Impact Function claimBribesFromHiddenHand makes some external calls to token lists which fetches from hiddenHandDistributor.rewards if AURA was on of those tokens and also one of those tokens were malicious or made some external call then it's possible to reent...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2022/06/16 12:0 a.m.8 views

Update initializer modifier to prevent reentrancy during initialization

Lines of code Vulnerability details The solution uses: OpenZeppelin/[email protected] These dependencies have a known high severity vulnerability: Which makes these contracts vulnerable: Recommended Mitigation Steps Upgrade @openzeppelin/contracts-upgradeable to version 4.4...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2022/06/16 12:0 a.m.12 views

attacker can call sweepRewardToken() when bribesProcessor==0 and reward funds will be lost because there is no check in sweepRewardToken() and _handleRewardTransfer() and _sendTokenToBribesProcessor()

Lines of code Vulnerability details Impact If the value of bribesProcessor was 0x0 the default is 0x0 and governance can set to 0x0 then attacker can call sweepRewardToken make contract to send his total balance in attacker specified token to 0x0 address. Proof of Concept the default value of...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2022/06/15 12:0 a.m.14 views

Gitignore too low

Lines of code Vulnerability details Impact Detailed description of the impact of this finding. Proof of Concept Provide direct links to all referenced code in GitHub. Add screenshots, logs, or any other relevant proof that illustrates the concept. Too short gitignore Tools Used Recommended...

7.1AI score
SaveExploits0
Code423n4
Code423n4
added 2022/06/14 12:0 a.m.12 views

Users Might Not Be Able To Purchase Or Redeem SetToken

Lines of code Vulnerability details Proof-of-Concept Whenever a setToken is issued or redeemed, the moduleIssueHook and moduleRedeemHook will be triggered. These two hooks will in turn call the redeemMaturedPositions function to ensure that no matured fCash positions remain in the Set by redeemin...

6.6AI score
SaveExploits0
Code423n4
Code423n4
added 2022/06/14 12:0 a.m.13 views

you can mint any amount of tokens and steal eth from the contract

Lines of code Vulnerability details Impact attacker calls the mintViaAsset function if attacker want to lend eth that you suppy the contract , it wil take eth make it into weth then what you lend . you can mint how many tokens you want because if iseth is true it just converts the eth to weth and...

6.7AI score
SaveExploits0
Code423n4
Code423n4
added 2022/06/14 12:0 a.m.12 views

Round down in previewWithdraw() may result in withdrawing asset using zero share.

Lines of code Vulnerability details Impact In wfCashERC4626.previewWithdraw function, when fCash has matured, shares is calculated using convertToShares. But convertToShares function rounded down in division. This may lead to the case that user can use zero share to withdraw asset. It has been...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2022/06/14 12:0 a.m.15 views

Integer overflow can affect router balances

Lines of code Vulnerability details Impact Integer overflow can affect router balances. Proof of Concept The repayAavePortal method of the PortalFacet contract subtracts the balance within an unchecked region, but this balance is not checked beforehand to be greater than the amountIn. unchecked...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2022/06/14 12:0 a.m.14 views

IsWrappedFcash check is a gas bomb

Lines of code Vulnerability details Impact In the isWrappedFCash check, the notionalTradeModule check whether the component is a wrappedCash with the following logic. try IWrappedfCashfCashPosition.getDecodedID returnsuint16 currencyId, uint40 maturity try...

6.7AI score
SaveExploits0
Code423n4
Code423n4
added 2022/06/14 12:0 a.m.11 views

Wrapped idiosyncratic (non-tradable) fCash can possibly not be unwrapped prior to maturity

Lines of code Vulnerability details What is idiosyncratic fCash? Markets may not always trade at the exact maturities of all fCash assets. fCash that does not fall on an exact maturity is called idiosyncratic fCash. To value these assets, Notional takes the linear interpolation of the rates of th...

6.7AI score
SaveExploits0
Code423n4
Code423n4
added 2022/06/14 12:0 a.m.18 views

The Oracle address settings for the PriceOracle.sol contract are not checked for ZERO Address, and will not do the expected work if the prophecy machine address is set to Zero address (which will be populated with 0 by default if not passed to the constructor).

Lines of code Vulnerability details Impact Detailed description of the impact of this finding. The getPrice function of the PriceOracle contract internally calls getPriceFromAdapters to get the price, but does not check that the adapters are not set to Zero Address, so when the address in the...

7.1AI score
SaveExploits0
Code423n4
Code423n4
added 2022/06/14 12:0 a.m.12 views

wfCashERC4626.sol#redeem() Lack of slippage control for market sell

Lines of code Vulnerability details function redeem uint256 shares, address receiver, address owner public override returns uint256 // It is more accurate and gas efficient to check the balance of the // receiver here than rely on the previewRedeem method. uint256 balanceBefore =...

6.7AI score
SaveExploits0
Total number of security vulnerabilities10190