Lucene search
+L
Code423n4Recent

10190 matches found

Code423n4
Code423n4
•added 2023/07/21 12:00 a.m.•18 views

Honest users could lose funds due to the current implementation of executeProposal()

Lines of code Vulnerability details Impact In the InterChainGovernance.sol contract, the executeProposal function lacks an explicit check to ensure that the msg.value provided with the function call is greater than or equal to the nativeValue specified. After an extensive discussion with the...

7.3AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/07/21 12:00 a.m.•24 views

The is no way for native tokens to get sent to InterchainProposalExecutor

Lines of code Vulnerability details Impact Proposals that require value cannot be executed as native tokens on the other side of the bridge cannot be provided. Proof of Concept Proposals have a value parameter, which allows users to specify what amount of native tokens should be passed when calli...

7.2AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/07/21 12:00 a.m.•18 views

Gas refunds are returned to the wrong address, leading to loss of funds for the payer

Lines of code Vulnerability details Impact To pay for cross-chain messages/calls, a user/third-party service must pay a reasonable fee in this case using the native token. However, often times a user will overpay to ensure that there is an adequate buffer for their tx to successfully succeed in...

7.2AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/07/21 12:00 a.m.•20 views

M-06 Unmitigated

Lines of code Vulnerability details Original Issue code-423n4/2023-06-angle-findings13 Details This issue shows users may lose a portion of yield when protocolSafetyFee and vestingPeriod are changed. As mitigation, it recommends accruing interests before those parameters are changed. Mitigation P...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/07/21 12:00 a.m.•20 views

Attacker can create additional canonical token bridge

Lines of code Vulnerability details Impact Deployers of custom TokenManagers can subvert the limitation imposed in the documentation that allows only one Canonical Bridges for each existing ERC20 token: “deployers can deploy a Canonical Bridge for any token they want, this can be done only once p...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/07/21 12:00 a.m.•32 views

M-02 Unmitigated

Lines of code Vulnerability details Original Issue code-423n4/2023-06-angle-findings31 Details It shows LibGetters.getCollateralRatio might return the incorrect ratio due to the unsafe cast. Mitigation PR: AngleProtocol/angle-transmuter@6f2ffcb During the mitigation, it uses the safeCast library...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/07/18 12:00 a.m.•19 views

Attacker can brick redemptions by donating a small amount

Lines of code Vulnerability details Impact While the fix properly fixes the issue of collateralization ratio overflows that can no longer occurs, it enables DoS attacks on the redemption mechanism: Issue description Consider the example that was already provided code-423n4/2023-06-angle-findings9...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/07/18 12:00 a.m.•13 views

Upgraded Q -> 2 from #392 [1689707598962]

Judge has assessed an item in Issue 392 as 2 risk. The relevant finding follows: 4 - The liquidator can be frontrunned while is depositing prizeTokens to the prizePool The liquidator should introduce prizeTokens to the prizePool before he calls the Vault.liquidate function. The problem is that a...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/07/18 12:00 a.m.•18 views

M-07 Unmitigated

Lines of code Vulnerability details The fix addresses the scenarios when collaterals are removed between the crafting of the minAmountsOut list and the submission of the transaction. Then, we will have amounts.length minAmountOuts.length, meaning that the following line causes a revert: if...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/07/18 12:00 a.m.•22 views

Guardian can brick SavingsVest contract accidentally

Lines of code Vulnerability details Impact The fix to M-06 introduces a new vulnerability, as it turns a missing validation that previously was recoverable i.e., only a minor thing into an irrecoverable error, resulting in a permanent loss of funds. Proof of Concept Consider the scenario where th...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/07/18 12:00 a.m.•27 views

Upgraded Q -> 2 from #422 [1689707351452]

Judge has assessed an item in Issue 422 as 2 risk. The relevant finding follows: 01 In the function PrizePool.setDrawManager, anyone can frontrun it and become the drawManager Reading the documentation of the Prize Pool contract, the following is specified: The Prize Pool allows a 'draw manager'...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/07/18 12:00 a.m.•19 views

Upgraded Q -> 2 from #93 [1689707967381]

Judge has assessed an item in Issue 93 as 2 risk. The relevant finding follows: L-01 - no check on the deployedVaults mapping in the VaultFactory can lead to duplicate vaults being created Mitigation - add an if check to not recreate the same vault: ifdeployedVaultsvault revert.... --- The text w...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/07/18 12:00 a.m.•17 views

M-04 Unmitigated

Lines of code Vulnerability details While the fix improves the APR estimation for the case that is described in the finding, it significantly worsens it for other scenarios which may happen in practice when we assume underlying staking protocols with relatively constant APRs. For instance, consid...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/07/14 12:00 a.m.•16 views

Possible centralization issue in PrizePool.closeDraw

Lines of code Vulnerability details The winning random number is chosen by DrawManager, which will lead to centralization risk. Despite haventt really deep dive in codebase of this issue, but if DrawManager ,can somehow calculate which random number can make their controlled address is winner wit...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/07/14 12:00 a.m.•29 views

balanceOf method can be manipulate to liquidated vault

Lines of code Vulnerability details Impact Deriving price from balanceOf can be manipulated to liquidate vault see example Attacker can provide ERC20 token to the vaultAsset and mint vault shares. The deposited tokens will then be withdrawn with having same shares in the vault. The shares then wi...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/07/14 12:00 a.m.•14 views

tx.origin may be removed in future and its usage is not recommended

Lines of code Vulnerability details Impact There is a chance that tx.origin will be removed from the Ethereum protocol in the future, so code that uses tx.origin must be avoid for the authentication purpose. There is also some EIPs being proposed for change/remove of tx.origin. ethereum/EIPs637 I...

7.2AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/07/14 12:00 a.m.•16 views

_amountOut is representing assets and shares at the same time in the liquidate function

Lines of code Vulnerability details Impact In the liquidate function from the Vault contract, the input argument amountOut is used as if it was representing a value of asset amount and share amount at the same time which is impossible a there a conversion rate between them, this error will make...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/07/14 12:00 a.m.•10 views

Yield fee can be stolen

Lines of code Vulnerability details Impact The yieldFeeRecipient can claim some of the fees earned in the vault by calling mintYieldFee. The function has no access control so anyone can call the function and claim the yield fee for themselves. Proof of Concept In the below test an attacker Alice...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/07/14 12:00 a.m.•18 views

Attacker can force users to delegate to SPONSORSHIP_ADDRESS

Lines of code Vulnerability details Impact An attacker can change the delegatee of a user who deposited into the vault to the SPONSORSHIPADDRESS address by calling one of the functions sponsor or sponsorWithPermit and giving the address of the user as receiver. The impact of this issue is that th...

6.6AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/07/14 12:00 a.m.•17 views

_winningRandomNumber vartiable used in calculating if caller is winner can be read via web3.getStorageAt() and user can predict if he wins or not before hand

Lines of code Vulnerability details Impact the variable winningRandomNumber used in isWinner to calc if caller has won the tier can be read, and the calculation can be predicted. Proof of Concept that a variable is marked internal doesnt mean it cannot be read Tools Used vs code Recommended...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/07/14 12:00 a.m.•17 views

CONFIGURING ALLOWANCE TO ZERO FOR THE _previousLiquidationPair CAN BE FRONT RUN

Lines of code Vulnerability details Impact The Vault.setLiquidationPair is used to change the liquidationPair address to a new address. In the process it sets the allowance of the previousLiquidationPair to zero as shown below: if previousLiquidationPair != address0...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/07/14 12:00 a.m.•13 views

Pending owner can be the wrong recipient of ownership

Lines of code Vulnerability details Impact An attacker can call the acceptOwnership function with their address as the pending owner before the legitimate pending owner has a chance to call the function Proof of Concept The transferOwnership function allows the current owner to set a pending owne...

6.6AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/07/14 12:00 a.m.•14 views

Potential Reversion in Transfer due to LSP1 Interface Support Check

Lines of code Vulnerability details Impact The transfer function in LSP7DigitalAssetCore & LSP8DigitalAssetCore includes a mandatory hook, notifyTokenSender, which verifies if the sender supports INTERFACEIDLSP1. However, if a token owner who initially implemented LSP1 interface ceases to support...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/07/14 12:00 a.m.•26 views

Unrestricted Name and Symbol Modification in LSP7 and LSP8 Digital Assets

Lines of code Vulnerability details Impact The owner of a contract in LSP8IdentifiableDigitalAsset and LSP7DigitalAsset can arbitrarily change the name and symbol of a token after its deployment. This ability is due to the inheritance of the setData function from ERC725YCore.sol implemented in...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/07/14 12:00 a.m.•13 views

Potential Ownership Issues Due to External Calls in LSP0ERC725AccountCore's execute and executeBatch Functions

Lines of code Vulnerability details Impact In the LSP0ERC725AccountCore contract, the execute and executeBatch functions use the LSP20CallVerification standard. In some cases, you may need to use verifyCallAfter. However, because an external call is made between verifyCall and verifyCallAfter, th...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/07/14 12:00 a.m.•17 views

possible revert due to improper subtraction in _extendableMsgData() of LSP17Extension.sol

Lines of code Vulnerability details Impact in extendableMsgData of LSP17Extension.sol there is an arithmetic calculation msg.data:msg.data.length - 52; msg.data.length may be smaller than 52 in some instances. this can cause reverts in solidity Proof of Concept function extendableMsgData internal...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/07/14 12:00 a.m.•20 views

The owner of a LSP0ERC725Account can become the owner again after renouncing ownership

Lines of code Vulnerability details Bug Description The renounceOwnership function allows the owner of a LSP0ERC725Account to renounce ownership through a two-step process. When renounceOwnership is first called, renounceOwnershipStartedAt is set to block.number to indicate that the process has...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/07/14 12:00 a.m.•8 views

LSP8Burnable extension incorrectly inherits LSP8IdentifiableDigitalAssetCore

Lines of code Vulnerability details Bug Description The LSP8Burnable contract inherits from LSP8IdentifiableDigitalAssetCore: LSP8Burnable.solL15 abstract contract LSP8Burnable is LSP8IdentifiableDigitalAssetCore However, LSP8 extensions are supposed to inherit LSP8IdentifiableDigitalAsset instea...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/07/14 12:00 a.m.•12 views

Failed transfer with low level call could be overlooked

Lines of code Vulnerability details Impact Transfers may fail silently. Proof of Concept According to the Solidity docs: "The low-level functions call, delegatecall and staticcall return true as their first return value if the account called is non-existent, as part of the design of the EVM...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/07/14 12:00 a.m.•11 views

Inconsistencies When Using Inherited Functions

Lines of code https://github.com/code-423n4/2023-06-lukso/blob/9dbc96410b3052fc0fd9d423249d1fa42958cae8/contracts/LSP0ERC...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/07/14 12:00 a.m.•20 views

withdrawReserve will revert when withdrawing tokens with on chain tx fees

Lines of code Vulnerability details Impact Function will revert when reserve is equal to amount, when the token being transferred is a fee on transfer token. Proof of Concept function withdrawReserve address to, uint104 amount external onlyDrawManager function withdrawReserve address to, uint104...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/07/14 12:00 a.m.•23 views

Permit does not revert for tokens that do not implement it.

Lines of code Vulnerability details Impact Callers should not rely on permit to revert for arbitrary tokens especially if permit is used as a security check. Tokens which do not revert on permit either do not implement it or have a non-reverting fallback function. Most notable among them is WETH...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/07/14 12:00 a.m.•12 views

Vault.sponsor may take away the prize chance from the receiver.

Lines of code Vulnerability details Impact TwabController.delegateBalance is related to the probability to get the prize, and Vault.sponsor can make the others' delegateBalance to 0. A malicious user can send a small amount of assets to every depositor and be the only prize taker. Proof of Concep...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/07/14 12:00 a.m.•23 views

No access control on mintYieldFee

Lines of code Vulnerability details Impact Lack of access-control allows anyone to mint the yield fee to himself. Proof of Concept Vault.mintYieldFee does not restrict the recipient yield fees: function mintYieldFeeuint256 shares, address recipient external requireVaultCollateralized; if shares...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/07/14 12:00 a.m.•23 views

An identical vault can be deployed with existing values, the logic controlling this is missing

Lines of code Vulnerability details VaultFactory. The deployVault function deploys a new vault with 10 arguments, but does not check if there is a vault already deployed with the same arguments This seems to have been preferred as a design, but malicious people with copy safes can direct users to...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/07/14 12:00 a.m.•20 views

Incorrect distribution of shares and liquidity as a result of total number of shares not equaling 100

Lines of code Vulnerability details Impact If the shares are not properly validated and do not add up to 100, there will be an imbalance in the distribution of funds resulting in loss of funds or locked funds that cannot be accessed or distributed correctly. Proof of Concept The constructor of th...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/07/14 12:00 a.m.•36 views

Attacker can steal vault funds through the deposit function.

Lines of code Vulnerability details Impact In the deposit function, a check is made to see if the amount of assets being deposited by the user is greater than the amount of assets the vault currently holds. The vault then transfers the difference between the assets being deposited and the vault’s...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/07/14 12:00 a.m.•20 views

Deposit transaction is prone to being front-run by bad actors.

Lines of code Vulnerability details Impact It is possible for an attacker to front-run a user's deposit transaction while transferring fewer amount of assets than the user and minting an equivalent amount of shares as the user could have. Proof of Concept The scenario described below is for the...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/07/14 12:00 a.m.•13 views

Using supportsERC165InterfaceUnchecked() might break LSP functionality for certain contracts

Lines of code Vulnerability details Bug Description Throughout the codebase, the protocol uses the supportsERC165InterfaceUnchecked function from Openzeppelin's ERC165Checker.sol to check for the support of ERC-165 interface IDs. However, supportsERC165InterfaceUnchecked only checks if the call t...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/07/14 12:00 a.m.•21 views

initialize function can be front run

Lines of code Vulnerability details Impact Initialize function have the potential of front running by a malicious actor. An attacker can front-run the deployer and takeover the contract by setting itself as the owner in the Contract. Taking ownership will result in carrying out malicious acts tha...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/07/14 12:00 a.m.•12 views

LSP8CompatibleERC721's approve() deviates from ERC-721 specification

Lines of code Vulnerability details Bug Description The LSP8CompatibleERC721 contract is a wrapper around LSP8 that is meant to function similarly to ERC-721 tokens. One of its implemented functions is ERC-721's approve: LSP8CompatibleERC721.solL155-L158 function approveaddress operator, uint256...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/07/14 12:00 a.m.•17 views

Incorrect amount of tokens is transferred before updating the accumulator and emitting the ContributePrizeTokens event

Lines of code Vulnerability details Impact An attacker can call the contributePrizeTokens function with a lower amount of tokens than claimed, misleading the contract to update the accumulator and emit the event based on the incorrect amount. As a result, the prize pool's internal state will be...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/07/14 12:00 a.m.•32 views

Allowing delegate call with msg.value in executeBatch() is dangerous

Lines of code Vulnerability details Bug Description ERC725XCore's execute function allows four types of operations: 1. CALL for normal calls 2. DELEGATECALL 3. CREATE/CREATE2 for contract deployment 4. STATICCALL The executeBatch function simply calls execute in a loop to perform multiple calls i...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/07/14 12:00 a.m.•8 views

All Ether sent to LSP0ERC725Account will be permanently locked

Lines of code Vulnerability details Impact All Ether sent to LSP0ERC725Account will be permanently locked because it inherits the receive function from the LSP0ERC725AccountCore contract but does not have a withdraw function. Proof of Concept All Ether sent to LSP0ERC725Account will be permanentl...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/07/14 12:00 a.m.•15 views

A Storage Write Removal Bug in contracts

Lines of code Vulnerability details Summary In fallbackLSP17Extendable, Calling functions that conditionally terminate the external EVM call using the assembly statements return... may result in incorrect removals of prior storage writes. Impact In LSP17Extendable.sol, fallbackLSP17Extendable is...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/07/14 12:00 a.m.•18 views

No access control for mintYieldFee()

Lines of code Vulnerability details Impact Anyone can mint the yield fee using mintYieldFee. Proof of Concept mintYieldFee mints the shares for yield fee. function mintYieldFeeuint256 shares, address recipient external requireVaultCollateralized; if shares yieldFeeTotalSupply revert...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/07/14 12:00 a.m.•24 views

_getNextObservationIndex() Random use of timestamp to determine the currentTime can be manipulated bacause of dangerous strict equalities

Lines of code Vulnerability details Impact The use of strict equalities can be easily manipulated by an attacker. Miners may attempt to manipulate the timestamp. Proof of Concept File: TwabLib.sol Code Link: Code: if newestObservation.timestamp == currentTime File: TwabLib.sol Code Link: Code: if...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/07/14 12:00 a.m.•14 views

Missing access control in mintYieldFee allowing everybody to mint the available YieldFee to himself

Lines of code Vulnerability details Impact Everybody can call the mintYieldFee function in the Vault, when there is yieldFeeTotalSupply available and mint shares to himself for free, which latter results in stealing funds form the Vault. if this is a desired behavior, which it shouldn't based on...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/07/14 12:00 a.m.•11 views

No validation check for whether the msg.value is not less than the value parameter in the execute function

Lines of code Vulnerability details Impact Users can send msg.value lesser than the supplied value parameter leading to incorrect accounting. Proof of Concept There is no check for whether msg.value = value in the execute function of the LSP0ERC725AccountCore contract. LSP0ERC725Account is in sco...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/07/14 12:00 a.m.•17 views

Malicious yield vault owners can manipulate the interaction between the vault and yield vault

Lines of code Vulnerability details Impact Malicious yield vault owners can steal depositor's assets. Proof of Concept yieldVault is the Address of the ERC4626 vault in which assets are deposited to generate yield. After tokens are deposited into the vault, the deposit function of yieldVault is...

7AI score
SaveExploits0
Total number of security vulnerabilities10190