Lucene search
K
Code423n4Recent

10190 matches found

Code423n4
Code423n4
added 2022/06/19 12:0 a.m.6 views

Buyer may not agree on gasCost

Lines of code Vulnerability details Impact Gas cost when matching orders is payed by the buyer. Since buyers don't have control on order execution, they may spend more gas than what they are willing to. Examples: periods of high gasPrice, or if NFTs for some reason consume a extra amount of gas...

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

Upgraded Q -> M from 243 [1655572117784]

Judge has assessed an item in Issue 243 as Medium risk. The relevant finding follows: Title: Using SafeERC20 library in ForgottenRunesWarriorsMinter.sol There are some token which are not implementing current ERC20 standard example: USDT, OmiseGo and BNB. Using SafeERC20 library will be nice to...

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

Upgraded Q -> M from 180 [1655579854185]

Judge has assessed an item in Issue 180 as Medium risk. The relevant finding follows: Use of send might fail in the future send only forward 2300 gas which may break when gas cost change in a future ETH upgrade see: function withdrawAll public payable onlyOwner...

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

_processExtraToken() in _sendBadgerToTree() will transfer BADGER again

Lines of code Vulnerability details Impact sendBadgerToTree sends amount BADGER to BADGERTREE. However processExtraToken in sendBadgerToTree also sends amount BADGER to the vault. it sends amount BADGER twice. It could result in revert if it doesn't have enough balance of BADGER. Proof of Concept...

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

Attacker can steal money from the initializer function

Lines of code Vulnerability details Impact Your Using old openzeplin Verision which the initializer function is vulnerable to and an attacker can call it twice after it’s been initliazed and since it approves max tokens to those contract. Which then after it’s first initialization the attacker...

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

Should also check balanceOfRewards in _withdrawAll()

Lines of code Vulnerability details Impact withdrawAll should check that all of your positions are unwinded. It does check balanceOfPool and LOCKER.balanceOf. Then withdrawToVault in BaseStrategy.sol can transfer all want to the vault. But it doesn’t check reward tokens. want could also be one of...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2022/06/18 12:0 a.m.5 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
Exploits0
Code423n4
Code423n4
added 2022/06/18 12:0 a.m.5 views

Fee-on-transfer support

Lines of code Vulnerability details Impact Every time transferFrom or transfer function in ERC20 standard is called there is a possibility that underlying smart contract did not transfer the exact amount entered. It is required to find out contract balance increase/de...

6.7AI score
Exploits0
Code423n4
Code423n4
added 2022/06/18 12:0 a.m.12 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
Exploits0
Code423n4
Code423n4
added 2022/06/18 12:0 a.m.8 views

_harvest() performs market swaps without slippage control and is a subject to sandwich attacks

Lines of code Vulnerability details As a result trades happen at a manipulated price and end up receiving fewer tokens than current market price dictates. Placing severity to medium as impact here is a partial fund loss conditional only on big enough asset amount to be swapped: sandwich attacks a...

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

TODO: Hardcode claim.account = address(this)?

Lines of code Vulnerability details Impact Why you still has a TODO in the final code? TODO: Hardcode claim.account = addressthis? It is not implemented yet. claim.account may be any value, which may break the claiming process or let user steal fund that intended to be used in MyStrategy to their...

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

prepareWithdrawAll should not be external

Lines of code Vulnerability details Impact Despite commented as Internal Core Implementations, prepareWithdrawAll is external. There also lack guarantee that prepareWithdrawAll is called before withdrawAll. Proof of Concept /// ===== Internal Core Implementations ===== function prepareWithdrawAll...

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

YearnCurveVaultOperator's depositETH can leave the remainder ETH funds frozen and unaccounted for, then utilized by another caller

Lines of code Vulnerability details depositETH effectively do not control the utilization of input token and can freeze WETH input funds in native ETH form on the contract balance when Yearn pool doesn't perform liquidity addition for any reason. Due to presence of the additional WETH - ETH step,...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2022/06/18 12:0 a.m.9 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
Exploits0
Code423n4
Code423n4
added 2022/06/18 12:0 a.m.10 views

_harvest rewards can be stolen because it doesn't implement any slippage bounds

Lines of code Vulnerability details Impact Harvested funds stolen Proof of Concept harvest does not implement any kind of minimum out when calling the 3 consecutive swaps L249, L263 and L275 to get from auraBal to Aura. An attacker could easily sandwich the least liquid pool and steal all the...

6.7AI score
Exploits0
Code423n4
Code423n4
added 2022/06/18 12:0 a.m.12 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
Exploits0
Code423n4
Code423n4
added 2022/06/18 12:0 a.m.8 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
Exploits0
Code423n4
Code423n4
added 2022/06/18 12:0 a.m.7 views

Operator may be removed without checking whether are there fund locked in that operator.

Lines of code Vulnerability details Impact Operator may be removed without checking whether are there fund locked in that operator. Locked fund may not be able to withdraw unless operator is being added back. Proof of Concept /// @inheritdoc INestedFactory function removeOperatorbytes32 operator...

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

Override function but with different argument location

Lines of code Vulnerability details IYearnVault.sol.withdraw inherent IStakingVault.sol.withdraw but the parameters does not match --- The text was updated successfully, but these errors were encountered: All reactions...

6.9AI score
Exploits0
Code423n4
Code423n4
added 2022/06/18 12:0 a.m.10 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
Exploits0
Code423n4
Code423n4
added 2022/06/18 12:0 a.m.8 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
Exploits0
Code423n4
Code423n4
added 2022/06/18 12:0 a.m.5 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
Exploits0
Code423n4
Code423n4
added 2022/06/18 12:0 a.m.12 views

Any User May Transfer Rewards From AuraLocker To MyStrategy These Rewards Are Unaccounted For and Stuck

Lines of code Vulnerability details Impact Harvesting the rewards from AuraLocker incorrectly assumes that rewards are only transferred during harvest when LOCKER.getRewardsaddressthis is called. However it is possible for anyone to call AuraLocker.getRewardsaddressMyStrategy and transfer the...

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

Emergency withdrawals are broken

Lines of code Vulnerability details Impact Usually, in emergency situations, contracts will be paused by the owner to prevent further damage. To withdraw all funds, the MyStrategy.prepareWithdrawAll function has to be manually called right before BaseStrategy.withdrawToVault can be called see...

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

_sendTokenToBribesProcessor() doesn't check bribesProcessor's address. Could cause permanent loss of fund

Lines of code Vulnerability details Impact In sendTokenToBribesProcessor, it sends tokens to bribesProcessor. It seems to be ok because claimBribesFromHiddenHand will confirm that bribesProcessor is not address0. sweepRewardToken also triggers sendTokenToBribesProcessor. But it doesn’t check...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2022/06/18 12:0 a.m.7 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
Exploits0
Code423n4
Code423n4
added 2022/06/18 12:0 a.m.10 views

Vault can never fully be emptied

Lines of code Vulnerability details Impact Vault cannot be fully emptied Proof of Concept Whenever rewards are earned they are automatically locked into the the Aura Locker. Since that reward will then earn more rewards while locked, there will be more rewards to be collected when that lock is...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2022/06/18 12:0 a.m.7 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
Exploits0
Code423n4
Code423n4
added 2022/06/18 12:0 a.m.6 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
Exploits0
Code423n4
Code423n4
added 2022/06/18 12:0 a.m.10 views

Missing slippage protection for autocompounding auraBAL rewards into AURA

Lines of code Vulnerability details Impact Autocompounding auraBAL rewards into AURA requires multiple swaps auraBAL - BAL/ETH BPT - WETH - AURA within MyStrategy.harvest. The swaps are at risk of being front-run / sandwiched, resulting in a loss of funds. Since MEV is very prominent I think the...

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

Beefy vault can be removed without withdrawing all deposited tokens. Causing these token to be locked forever unless an owner is added this vault back.

Lines of code Vulnerability details Impact Beefy vault can be removed without withdrawing all deposited tokens. Causing these token to be locked forever unless an owner is added this vault back. Proof of Concept function removeVaultaddress vault external onlyOwner requirevaultsvault != address0,...

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

Upgraded Q -> M from 44 [1655579898351]

Judge has assessed an item in Issue 44 as Medium risk. The relevant finding follows: 1. Usage of legacy ETH transfer function Risk Low Impact Contract ForgottenRunesWarriors for withdrawing ETH to vault uses send function, which has a fixed gas stipend and can fail. The reason behind this is that...

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

_harvest has no slippage protection when swapping auraBAL for AURA

Lines of code Vulnerability details Impact Single swaps of harvest contains no slippage or deadline, which makes it vulnerable to sandwich attacks, MEV exploits and may lead to significant loss of yield. Proof of Concept When using BALANCERVAULT.swap here and here, there is no slippage protection...

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

auraBAL can be stuck into the Strategy contract

Lines of code Vulnerability details Impact The internal harvest function defined is responsible to claim auraBAL from the aura locker and within the function it swaps them to auraBAL - BAL/ETH BPT - WETH - AURA, finally it locks AURA to the locker to increase the position. For claiming auraBAL it...

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

Withdrawing all funds at once to vault can be DoS attacked by frontrunning and locking dust

Lines of code Vulnerability details Impact All funds can be migrated withdrawn at once to the caller vault by using the BaseStrategy.withdrawToVault function which internally calls MyStrategy.withdrawAll. The latter function has the following check in place: MyStrategy.solL184-L187 require...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2022/06/18 12:0 a.m.10 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
Exploits0
Code423n4
Code423n4
added 2022/06/18 12:0 a.m.13 views

If token == BADGER, the _handleRewardTransfer function does not work

Lines of code MyStrategy.solL405-L413 BaseStrategy.solL346-L353 Vault.solL396-L415 Vulnerability details Impact In MyStrategy.sol, when claiming bribes or sweeping reward tokens, the handleRewardTransfer function is called which calls sendToBadgerTree to send the amount of BADGER in the contract ...

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

Update initializer modifier to prevent reentrancy during initialization

Lines of code Vulnerability details Impact The solution uses: "OpenZeppelin/[email protected]". This dependency has a known high severity vulnerability: Which makes MyStrategy contract vulnerable contract MyStrategy is BaseStrategy, ReentrancyGuardUpgradeable ... function...

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

Upgraded Q -> M from 47 [1655579885825]

Judge has assessed an item in Issue 47 as Medium risk. The relevant finding follows: 4. Don't use payable.transfer/payable.send The use of payable.transfer is heavily frowned upon because it can lead to the locking of funds. The transfer call requires that the recipient is either an EOA account,...

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

Fee-on-transfer support

Lines of code Vulnerability details Impact Every time transferFrom or transfer function in ERC20 standard is called there is a possibility that underlying smart contract did not transfer the exact amount entered. It is required to find out contract balance increase/decrease after the transfer to...

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

Yield can be lost due to not specifying limit when transferring auraBAL to BAL/ETH BPT

Lines of code Vulnerability details Impact In harvest, when swapping auraBAL to BAL/ETH BPT the limit variable which specifies the minimum amount of tokens that are to be received when singleSwap.kind=GIVENIN is set to 0. This means that when the swap is made, the transaction can be frontrun and...

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

Wrong Deadline

Lines of code Vulnerability details the deadline is the timestamp after which the transaction will revert. the goal of this field is that the caller can set a deadline for the transaction so the transaction will not succeed in any arbitrary time in the future, and after this deadline, they can...

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

Upgraded Q -> M from 205 [1655579891083]

Judge has assessed an item in Issue 205 as Medium risk. The relevant finding follows: transfer and send methods are used inside the codebase. Since these methods use 2300 gas stipend which is not adjustable,it may likely to get broken when calling a contract's fallback function if any contract...

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

Principal payout

Lines of code Vulnerability details Impact It's possible to treat unvested aura as bribes and an attacker may cause a withdraw of AURA from the strategy to the popint where the debt in AURA to users cannot be covered by the strategy. Proof of Concept Anyone can create a valuable token in which it...

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

BADGER bribes can not be claimed

Lines of code Vulnerability details sendBadgerToTree will send BADGER twice and therefore fail. It is sending it to the BADGERTREE in sendBadgerToTree, and then continues to send the same amount to the vault in processExtraToken. Impact BADGER rewards cannot be claimed. The contract is trying to...

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

Yield can be lost due to not specifying limit when transferring WETH to Aura

Lines of code Vulnerability details Impact In the harvest function, when the contract swaps WETH to Aura, limit is set to 0 allowing an attacker to front run the transaction and cause substantional loss of yield. swapSingleSwap singleSwap, FundManagement funds, uint256 limit, uint256 deadline...

6.7AI score
Exploits0
Code423n4
Code423n4
added 2022/06/18 12:0 a.m.6 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
Exploits0
Code423n4
Code423n4
added 2022/06/18 12:0 a.m.5 views

Upgraded Q -> M from 153 [1655579808802]

Judge has assessed an item in Issue 153 as Medium risk. The relevant finding follows: L03 Callvalue:amt"" should be used instead of send In ForgottenRunesWarriorsGuild.withdrawAll. transfer and send should be avoided because they take a hard dependency on gas costs by forwarding a fixed amount of...

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

Upgraded Q -> M from 270 [1655579826704]

Judge has assessed an item in Issue 270 as Medium risk. The relevant finding follows: Gas stipend for payable.send may be too low for contract wallets ETH withdrawals in both the minter and token contracts use payableaddress.send to transfer ether to the vault address. If the configured vault is ...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2022/06/18 12:0 a.m.10 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
Exploits0
Total number of security vulnerabilities10190