10190 matches found
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...
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...
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...
isTimeSafe and isTimeRangeSafe not implemented in the functions getBalanceAt and getTwabBetween
Lines of code Vulnerability details Impact The Natspec of both getBalanceAt and getTwabBetween functions indicates that they should implement the functions isTimeSafe and isTimeRangeSafe respectively to ensure that the queried timestamps are safe, but both functions don't implement them which can...
deposit function does not check for the maxMint amount.
Lines of code Vulnerability details Impact It is theoretically possible for the deposit amount to mint shares more than the maxMint amount Proof of Concept The deposit function has a check for maxDeposit and reverts if the deposit value is more than maxuint96. But, it does not check the shares to...
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...
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...
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...
abi.encodePacked() collision due to dynamic types usage that could lead to
Lines of code Vulnerability details Impact The use of abi.encodePacked could lead to collision due to the dynamic types usage. Through abi.encodePacked, Solidity supports a non-standard packed mode where: Types shorter than 32 bytes are neither zero padded nor sign extended and Dynamic types are...
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...
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...
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...
Unsecure and predictable random number generation in closeDraw.winningRandomNumber_()
Lines of code Vulnerability details Impact Unsecure and predictable random number generation in closeDraw.winningRandomNumber can lead to external influence by malicious attackers. Leading to undermining of the fairness and security and unpredictability of the draw function. Both the timestamp an...
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...
user with ADDEXTENSIONS and CHANGEEXTENSIONS will remove extension unintentional
Lines of code Vulnerability details Summary Adding extension use 4 bytes function selector to add new extension, and if user with ADDEXTENSIONS permission also has CHANGEEXTENSIONS permission and wants to add new extension and there is an extension with that function selector, extension will be...
LSP8 and LSP9's ERC-165 interface ID differs from their specification
Lines of code Vulnerability details Bug Description According to LSP7's specification, the ERC-165 interface ID for LSP7 token contracts should be 0x5fcaac27: ERC165 interface id: 0x5fcaac27 However, INTERFACEIDLSP7 has a different value in the code: LSP7Constants.solL4-L5 // --- ERC165 interface...
Users might lose their balances when they set delegates
Lines of code Vulnerability details Impact Undelegated users will lose their balances if they set delegate to themselves. Proof of Concept A User can set a delegate and the delegated balance of the user will be accounted on the delegate's delegated balance in the TWAB controller. The internal...
Incorrect Interface ID for LSP14
Lines of code Vulnerability details Impact Contracts that use typeILSP14Ownable2Step.interfaceId, such as when implementing IERC165.supportsInterface, will use a value different from the current standard. Proof of Concept The interface ID of LSP14 is stated to be 0x94be5999. However, the interfac...
The exchange rate is decreasing in Vault
Lines of code Vulnerability details Impact The exchange rate of the vaults will be decreasing and this will block core functionalities. Proof of Concept The exchange rate of the Vault is calculated as follows: minwithdrawableAssets, totalSupplyToAssets assetUnit / totalSupplyAmount =...
The liquidate function lets the caller mint amountOut tokens without providing any
Lines of code Vulnerability details Impact Ther are a lot of check to ensure the parameters of the liquidate function are correct. However, it does not checki for amountIn to NOT be 0, thus it lets the caller proceed and mint amountOut tokens to account without providing any Proof of Concept...
_deployCreate()/_deployCreate2() will not work on ZKSync Era
Lines of code Vulnerability details Bug Description In the contest's Scoping Details, the sponsor states that Universal Profiles might eventually be deployed across multiple chains: Is it multi-chain? LUKSO itself is not a multi-chain. The lsp-smart-contracts are initially intended to be used on...
Malicious claimer could arbitrage the prize-claiming functionality
Lines of code Vulnerability details Impact The feePerClaim is a user controlled parameter which tops at tierLiquidity.prizeSize for a given tier see here for that. That means the CLAIMER can set arbitrary fees for a given call to claimPrize to increase maliciously the collected fees with //...
Potential Reversion in Transfer due to LSP1 Interface Support Check
Lines of code Vulnerability details SORRY I HAVFE PREVIOUSLY SUBMITTED THIS ISSUE WITHOUT THE FIX... FIRST TIME WARDEN FORGIVE ME Impact The transfer function in LSP7DigitalAssetCore & LSP8DigitalAssetCore includes a mandatory hook, notifyTokenSender, which verifies if the sender supports...
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...
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...
Missing External Transfer Function In Vault
Lines of code Vulnerability details Impact Balances of TwabController for a vault can not be transferred. Proof of Concept The Vault implements an internal transfer function meant to be used to transfer balances within the TwabController: function transferaddress from, address to, uint256 shares...
Vault funds can be stolen by a malicious Yield Vault.
Lines of code Vulnerability details Impact When a vault is initialized, it sets Max Token Approval for the Yield Vault which allows the Yield Vault to ALWAYS have access to the funds in the vault. Since vaults can be created by anyone as long as they provide an ERC-4626 compliant yield source, an...
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...
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...
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...
Unrestricted Name and Symbol Modification in LSP7 and LSP8 Digital Assets
Lines of code Vulnerability details I HAVE ALREADY SUBMITTED THIS ISSUE HOWEVER I MESSED UP THE LINKS FOR IT. CAN YOU PLEASE DISREGARD THE PREVIOUS SUBMISSION? Impact The owner of a contract in LSP8IdentifiableDigitalAsset and LSP7DigitalAsset can arbitrarily change the name and symbol of a token...
Two-step ownership transfer process in LSP0ERC725AccountCore can be bypassed
Lines of code Vulnerability details Bug Description To transfer ownership of the LSP0ERC725AccountCore contract, the owner has to call transferOwnership to nominate a pending owner. Afterwards, the pending owner must call acceptOwnership to become the new owner. When called by the owner,...
Inconsistencies When Using Inherited Functions
Lines of code https://github.com/code-423n4/2023-06-lukso/blob/9dbc96410b3052fc0fd9d423249d1fa42958cae8/contracts/LSP0ERC...
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...
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...
TwabLib::getTwabBetween can return innacurate balances if _startTime and _endTime aren't safely bounded
Lines of code Vulnerability details M-01 TwabLib::getTwabBetween can return innacurate balances if startTime and endTime aren't safely bounded Vulnerability details Here's the documentation of the get TwabLib::getTwabBetween function : File: twab-controller\src\libraries\TwabLib.sol 278: / 279:...
The output amount validation in Vault.liquidate() is not correct.
Lines of code Vulnerability details Impact The output amount validation is not correct in Vault.liquidate, so the method might accept invalid output amount and refuse valid output amount. Proof of Concept In Vault.liquidate, there is a validation about the output share amount should be less than ...
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...
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...
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...
Vetoer has too huge privileges which allow to burn veto power and change his/her address
Lines of code Vulnerability details Impact Only a current user with veto power can either change vetoer or pernamently destroy veto power forever. Since this functions are crucial for governance, they should also be called by admin. In the current scenario, vetoer has some higher privileges in...
initializer 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 NounsTokenFork.sol Contract. Taking ownership will result in passing valu...
Arbitrary Pending _setPendingVetoer Address Assignment.
Lines of code Vulnerability details Impact If an attacker successfully impersonates the vetoer, they can set any address as the pending vetoer. This can compromise the integrity of the vetoer role and enable unauthorized access or control over certain functions or actions within the contract. Pro...
Setting ownership to zero account in the function _renounceOwnership()
Lines of code Vulnerability details Impact In the renounceOwnership function, the call to setOwneraddress0 sets the owner address of the contract to address0, which represents the zero address in Ethereum. This effectively removes the ownership of the contract, as the zero address is not a valid...
Vetoed proposals still can be execute or queued
Lines of code Vulnerability details Impact Function veto does not change the state of the proposal. This means, that when a proposal is in a ProposalState.Queued state and then vetoed - it, still can be executed. The same occurs for proposals in ProposalState.Succeeded state - even after being...
Lack of Access Control in withdrawTokens Function Allows Unauthorized Token Withdrawal
Lines of code Vulnerability details Impact withdrawTokens function lacks proper access control, enabling an attacker to exploit it and withdraw tokens from the escrow to an arbitrary address, since no access control check ensures that only the DAO contract can invoke this function, and as a resul...
The NounsDAOLogicV3.sol contract has a receive function but no withdraw function.
Lines of code Vulnerability details Impact All Ether sent to the NounsDAOLogicV3.sol will be locked in the contract because it implements a receive function without a withdraw function. Proof of Concept The NounsDAOLogicV3.sol contract implements the receive function but does not have a withdraw...
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 using it. There is also some EIPs being proposed for change/remove of tx.origin. ethereum/EIPs637 In NounsDAOLogicV2.sol,...
Proposal can executed even when it is in the "Queued" state.
Lines of code Vulnerability details Impact An attacker can bypass the intended governance process and directly execute proposals that are still in the voting or canceled state. This can result in unauthorized actions being performed on the smart contract, leading to loss of funds Proof of Concept...
sendProRataTreasury() in NounsDAOV3Fork.sol can cause reverts in functions where it is called.
Lines of code Vulnerability details Impact sendProRataTreasury calls timelock.sendEth to send eth, timelock is a NounsDAOExecutorV2 contract. In NounsDAOExecutorV2.sendEth, it only allows calls from the address set to be admin in the NounsDAOExecutorV2 contract. NounsDAOV3Fork library is used in...