Lucene search
K
Code423n4Recent

10190 matches found

Code423n4
Code423n4
•added 2022/10/29 12:0 a.m.•10 views

arbitrary send erc20 safeTransferFrom

Lines of code Vulnerability details Impact uses arbitrary from in safeTransferFrom when msg.sender is not used as from in safeTransferFrom. Proof of Concept Alice approves this contract to spend her ERC20 tokens. Bob can call a and specify Alice's address as the from parameter in safeTransferFrom...

6.9AI score
Exploits0
Code423n4
Code423n4
•added 2022/10/29 12:0 a.m.•7 views

Incorrect implementation of extendPledge()

Lines of code Vulnerability details Impact Detailed description of the impact of this finding. The extendPledge function is not correctly implemented because even though the duration is extended, no changes are made to existing delegates who boost to this pledge. A few things need to change: 1 th...

7AI score
Exploits0
Code423n4
Code423n4
•added 2022/10/28 12:0 a.m.•10 views

Public Detectors arbitrary send erc20

Lines of code Vulnerability details Impact this flaw allows user B to steal the tokens approved by user A Proof of Concept Exploit Scenario: function aaddress from, address to, uint256 amount public erc20.transferFromfrom, to, am; Alice approves this contract to spend her ERC20 tokens. Bob can ca...

6.8AI score
Exploits0
Code423n4
Code423n4
•added 2022/10/25 12:0 a.m.•9 views

Reentrance attack to _payoutEth in contract PA1D

Lines of code Vulnerability details Impact Detailed description of the impact of this finding. The payoutEth is subject to the reentrancy attack if one of the addresses is a smart contract and has a receive function to call back payoutEth directly or indirectly. The 2300 gas limit might not preve...

7AI score
Exploits0
Code423n4
Code423n4
•added 2022/10/25 12:0 a.m.•8 views

PA1D._payoutTokens() won't work for USDT and other inconsistent ERC20 tokens.

Lines of code Vulnerability details Impact Some ERC20 tokens USDT, BNB, OMG do not return a boolean on succesful transfer. Checking the returned value of transfer for these tokens will always fail. Proof of Concept Usage of ERC20 interface and require statement in PA1D.sol. Recommended Mitigation...

6.8AI score
Exploits0
Code423n4
Code423n4
•added 2022/10/25 12:0 a.m.•5 views

Primary operator can unbond to avoid slashing and DOS job execution

Lines of code Vulnerability details If a primary operator fails to call HolographOperator.executeJob on time, a secondary operator can make the call, which will result in slashing the primary operator, as described in the documentation. The primary operator that failed to do the job, is slashed t...

6.8AI score
Exploits0
Code423n4
Code423n4
•added 2022/10/25 12:0 a.m.•11 views

Operator is not randomly selected

Lines of code Vulnerability details Impact Operator is not selected randomly, but entirely determined by the number of operators in pod. Proof of Concept The pod is selected by taking a number random modulo the number of pods Np. But then the operator is selected by taking the modulo of the same...

6.8AI score
Exploits0
Code423n4
Code423n4
•added 2022/10/25 12:0 a.m.•15 views

LayerZero Channel can be blocked by an attacker

Lines of code Vulnerability details Impact According to the LayerZero docs, the default behavior is that when a transaction on the destination application fails, the channel between the source and destination is blocked. Before any new transactions can be executed, the failed transaction has to b...

6.8AI score
Exploits0
Code423n4
Code423n4
•added 2022/10/25 12:0 a.m.•10 views

Recursive call attack of the fallback function of Holographer

Lines of code Vulnerability details Impact Detailed description of the impact of this finding. The fallback function will forward all calls except those that appear in Holographer to the HolographerEnforcer which is obtained by calling address holographEnforcer = getHolographEnforcer; However, if...

7AI score
Exploits0
Code423n4
Code423n4
•added 2022/10/25 12:0 a.m.•11 views

setRoyalties can lead to royalties set to greater than 100%, breaking royalty functionality

Lines of code Vulnerability details enforcer/PA1D can be used by NFT smart contracts to provide royalty info. The owner can call setRoyalties to set the royalties for a specific token id, or the default royalty of the collection. Marketplaces implementing EIP-2981 can then use royaltyInfo to get...

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

MED - NFTs become no longer holographable once new factory is connected.

Lines of code Vulnerability details Description The basic premise of the Holograph platform is that NFTs / ERC20s are holographable, in other words they will have the same address across all ERC20 compatible blockchains. This invariant is used countless times in the code base. For example, when...

6.9AI score
Exploits0
Code423n4
Code423n4
•added 2022/10/25 12:0 a.m.•14 views

_payoutToken[s]() is not compatible with tokens with missing return value

Lines of code Vulnerability details Impact Payout is blocked and tokens are stuck in contract. Proof of Concept PA1D.payoutToken and PA1D.payoutTokens call ERC20.transfer in a require-statement to send tokens to a list of payout recipients. Some tokens do not return a bool e.g. USDT, BNB, OMG on...

6.8AI score
Exploits0
Code423n4
Code423n4
•added 2022/10/25 12:0 a.m.•9 views

_payoutToken[s]() is not compatible with ERC20-tokens which revert on zero value transfer

Lines of code Vulnerability details Impact Payout is blocked. Proof of Concept PA1D.payoutToken and PA1D.payoutTokens call ERC20.transfer to send tokens to a list of payout recipients. Some tokens e.g. LEND revert when transferring a zero value amount. If one of the recipients is to receive a zer...

6.8AI score
Exploits0
Code423n4
Code423n4
•added 2022/10/25 12:0 a.m.•8 views

_payoutEth() calculates balance with an offset, always leaving dust ETH in the contract

Lines of code Vulnerability details Payout recipients can call getEthPayout to transfer the ETH balance of the contract to all payout recipients. This function makes an internal call to payoutEth, which sends the payment to the recipients based on their associated bp The issue is that the balance...

6.7AI score
Exploits0
Code423n4
Code423n4
•added 2022/10/25 12:0 a.m.•11 views

it is possible to front run the deployHolographableContract and alter the configuration

Lines of code Vulnerability details deployHolographableContract uses abi.encodePacked to encode configuration data and make the hash . thats while when using abi.encodePacked instead of abi.encode with dynamic types may result in some issues...

7AI score
Exploits0
Code423n4
Code423n4
•added 2022/10/25 12:0 a.m.•10 views

Pod can (likely) be chosen by miner

Lines of code Vulnerability details Impact The miner can chose pod with high probability. Proof of Concept The random number generation can be easily influenced by the miner by setting block.timestamp to within an acceptable value ranging some 10-15 consecutive values seconds. Since this is hashe...

6.7AI score
Exploits0
Code423n4
Code423n4
•added 2022/10/25 12:0 a.m.•7 views

Any user asset sent through the bridge can be frozen in limbo by a malicious operator.

Lines of code Vulnerability details Operator can fail transactions causing user to lose their send asset, due to incorrect gas check calculation. Line 416 in Operator. If gasleft = gasLimit + small amount, gas reaching nonRevertingBridgeCall will be 63/64 of casleft - CALL opcode code, which is...

7.1AI score
Exploits0
Code423n4
Code423n4
•added 2022/10/25 12:0 a.m.•11 views

Users could accidentally burn() and lose fund

Lines of code Vulnerability details Impact If users accidentally burn the token, the fund will be lost. There does not seem any reason for the users to call the public burn function, only by mistake calling the method to lose self fund. Proof of Concept // contracts/enforcer/HolographERC721.sol...

6.9AI score
Exploits0
Code423n4
Code423n4
•added 2022/10/25 12:0 a.m.•18 views

deployHolographableContract() uniqueness

Lines of code Vulnerability details Impact The holographable smart contract deployment can not guarantee the uniqueness. A malicious user could deploy multiple duplicate contracts, then the brigeIn could not make sure the uniqueness of the minted or burned NFT. Proof of Concept The salt and...

6.9AI score
Exploits0
Code423n4
Code423n4
•added 2022/10/25 12:0 a.m.•11 views

MED - Incorrect implementation of ERC721 may have bad consequences for receiver

Lines of code Vulnerability details Description HolographERC721.sol is an enforcer contract that fully implements ERC721. In its safeTransferFromFunction there is the following code: if isContractto require ERC165to.supportsInterfaceERC165.supportsInterface.selector &&...

6.8AI score
Exploits0
Code423n4
Code423n4
•added 2022/10/25 12:0 a.m.•9 views

# Divide before multiply affects precision

Lines of code Vulnerability details Divide before multiply affects precision Impact Solidity integer division might truncate. As a result, performing multiplication before division can sometimes avoid loss of precision. Details In general, this is a problem due to precision. In this case, it also...

6.8AI score
Exploits0
Code423n4
Code423n4
•added 2022/10/25 12:0 a.m.•9 views

Missing support of non-standart ERC20

Lines of code Vulnerability details Vulnerability details Description In functions of PA1D and HolographOperator contracts there is logic relying on the fact that tokens implemented ERC20 standard especially, that transfer and transferFrom functions of the tokens returns bool result. But in...

6.8AI score
Exploits0
Code423n4
Code423n4
•added 2022/10/25 12:0 a.m.•12 views

Reentrancy can increase allowance can be used to take more funds than expected

Lines of code Vulnerability details Reentrancy can increase allowance can be used to take more funds than expected In the same way as the typical front run of ERC20 approve/transferFrom, you would be able to take money when calling maliciousERC20.beforeApprove hook, this would realize a...

6.7AI score
Exploits0
Code423n4
Code423n4
•added 2022/10/25 12:0 a.m.•9 views

Royalties cannot be collected for many ERC20 tokens (USDT, BNB and many more) due to use of transfer function.

Lines of code Vulnerability details Description ERC20 royalties are paid using payoutTokens and payoutToken functions in PA1D.sol. Unfortunately these functions use ERC20's transfer instead of implementing safeTransfer: for uint256 i = 0; i length; i++ sending = bpsi balance / 10000;...

6.9AI score
Exploits0
Code423n4
Code423n4
•added 2022/10/25 12:0 a.m.•8 views

MED: Some royalty ETH will be stuck in the Holographer contract forever.

Lines of code Vulnerability details Description PA1D.sol's payoutEth function is responsible for distributing ETH holdings in the Holographer. It uses this code: uint256 gasCost = 23300 length + length; uint256 balance = addressthis.balance; requirebalance - gasCost 10000, "PA1D: Not enough ETH t...

7AI score
Exploits0
Code423n4
Code423n4
•added 2022/10/25 12:0 a.m.•12 views

_payoutEth() gas computation can make call revert even if balance is sufficient

Lines of code Vulnerability details Payout recipients can call getEthPayout to transfer the ETH balance of the contract to all payout recipients. This function makes an internal call to payoutEth, which computes the gasCost, then proceeds to check balance - gasCost 10000 before sending the result...

6.5AI score
Exploits0
Code423n4
Code423n4
•added 2022/10/25 12:0 a.m.•17 views

If bridge request fails users tokens are burned with no way to recover

Lines of code Vulnerability details Impact Users tokens are still burned at source chain with no way to recover them Proof of Concept try HolographOperatorInterfaceaddressthis.nonRevertingBridgeCallvalue: msg.value msg.sender, bridgeInRequestPayload /// @dev do nothing catch failedJobshash = true...

6.9AI score
Exploits0
Code423n4
Code423n4
•added 2022/10/25 12:0 a.m.•7 views

Users can avoid paying gas fees

Lines of code Vulnerability details Impact User can avoid paying gas fees by setting gasPrice to 1 wei and gasLimit to 0. Operators will not receive a gas compensation. Also, fallback operators won't be able to pick up such jobs. Proof of Concept 1. Bridging out is a public function that can be...

6.7AI score
Exploits0
Code423n4
Code423n4
•added 2022/10/25 12:0 a.m.•13 views

Optimistic bridging pattern, can lead to bridge exploitation

Lines of code Vulnerability details Impact Zero deposit Bridging. Wherease users can fake the depositing process but can mint multiple tokens in the destination chain. The bridging is optimistic, whereas the validation restricts to just checking the function selector and a no-error pattern, this...

7.2AI score
Exploits0
Code423n4
Code423n4
•added 2022/10/25 12:0 a.m.•8 views

Risk of reuse of signatures across forks due to lack of chainID validation

Lines of code Vulnerability details Impact In the HolographERC20.sol contract the contract is started with the init function, during which the eip712init function is triggered : contracts/enforcer/HolographERC20.sol: 244: eip712initdomainSeperator, domainVersion; With CACHEDCHAINID = block.chaini...

6.8AI score
Exploits0
Code423n4
Code423n4
•added 2022/10/25 12:0 a.m.•2 views

Minimum balance requirement for payout

Lines of code Vulnerability details Impact Payouts from PA1D.sol cannot be made unless the balance is sufficiently high, meaning Proof of Concept In PA1D.sol the payout functions payoutEth, payoutToken and payoutTokens require that balance 10000. If this is not met the recipients cannot receive...

6.7AI score
Exploits0
Code423n4
Code423n4
•added 2022/10/25 12:0 a.m.•7 views

Adversary can cause malicious slashing of operators by setting gas price low

Lines of code Vulnerability details Impact Operators are maliciously slashed Proof of Concept The gas price and limit can be set to whatever the user wishes when calling the bridge. A malicious user could set the gas prices to be low for current chain conditions. This would allow them to use up t...

6.7AI score
Exploits0
Code423n4
Code423n4
•added 2022/10/25 12:0 a.m.•7 views

HolographERC20 breaks composability by forcing usage of draft proposal EIP-4524

Lines of code Vulnerability details Description HolographERC20 is the ERC20 enforcer for Holograph. In the safeTransferFrom operation, it calls checkOnERC20Received: if isEventRegisteredHolographERC20Event.beforeSafeTransfer requireSourceERC20.beforeSafeTransferaccount, recipient, amount, data;...

6.8AI score
Exploits0
Code423n4
Code423n4
•added 2022/10/25 12:0 a.m.•16 views

Weak randomness

Lines of code Vulnerability details Vulnerability details Description In the function crossChainMessage of HolographOperator contract there is the following logic implemented for the calculation of the random value: / @dev use job hash, job nonce, block number, and block timestamp for generating ...

6.8AI score
Exploits0
Code423n4
Code423n4
•added 2022/10/25 12:0 a.m.•12 views

Signature replay attacks

Lines of code Vulnerability details Description There is a function deployHolographableContract from the HolographFactory smart contract. Among other things, the function verifies the ECDSA signature. The signed data for verification is constructed as a concatenation of different user-provided...

6.8AI score
Exploits0
Code423n4
Code423n4
•added 2022/10/25 12:0 a.m.•10 views

Pseudo randomness is not recommended

Lines of code Vulnerability details Impact Use of pseudo randomness in chain is not recommended as it can be predicted by anyone, this can affect value in case of minting or withdrawing in some scenarios Proof of Concept Tools Used Recommended Mitigation Steps Use oracles --- The text was updated...

6.9AI score
Exploits0
Code423n4
Code423n4
•added 2022/10/25 12:0 a.m.•15 views

LayerZeroModule miscalculates gas, risking loss of assets

Lines of code Vulnerability details Description Holograph gets it's cross chain messaging primitives through Layer Zero. To get pricing estimate, it uses the DstConfig price struct exposed in LZ's RelayerV2 The issue is that the important baseGas and gasPerByte configuration parameters, which are...

6.8AI score
Exploits0
Code423n4
Code423n4
•added 2022/10/25 12:0 a.m.•13 views

MEV: Operator can bribe miner and steal honest operator's bond amount if gas price went high

Lines of code Vulnerability details Description Operators in Holograph do their job by calling executeJob with the bridged in bytes from source chain. If the primary job operator did not execute the job during his allocated block slot, he is punished by taking a single bond amount and transfer it...

7AI score
Exploits0
Code423n4
Code423n4
•added 2022/10/25 12:0 a.m.•8 views

HIGH: Honest operator can lose their bonded amount although gas price was unacceptable during their slot

Lines of code Vulnerability details Description Operators in Holograph do their job by calling executeJob with the bridged in bytes from source chain. If the primary job operator did not execute the job during his allocated block slot, he is punished by taking a single bond amount and transfer it...

7AI score
Exploits0
Code423n4
Code423n4
•added 2022/10/25 12:0 a.m.•9 views

Holograph contracts can be deployed by any user successfully through user-crafted signature and signer input

Lines of code Vulnerability details Impact HolographFactory.deployHolographableContract deploys holographable smart contract by accepting config, signature and signer inputs. Due to user input signer passed by the caller, it is possible for signature verification to pass by using the known signer...

6.8AI score
Exploits0
Code423n4
Code423n4
•added 2022/10/25 12:0 a.m.•12 views

Incorrect usage of try/catch block

Lines of code Vulnerability details Vulnerability details Description There is a function getBridgeOutRequestPayload in HolographBridge contract. It has the following: / @dev the revertedBridgeOutRequest function is wrapped into a try/catch function / try this.revertedBridgeOutRequestmsg.sender,...

7AI score
Exploits0
Code423n4
Code423n4
•added 2022/10/25 12:0 a.m.•8 views

MED: isOwner / onlyOwner checks can be bypassed by attacker in ERC721/ERC20 implementations

Lines of code Vulnerability details Description ERC20H and ERC721H are base contracts for NFTs / coins to inherit from. They supply the modifier onlyOwner and function isOwner which are used in the implementations for access control. However, there are several functions which when using these the...

6.8AI score
Exploits0
Code423n4
Code423n4
•added 2022/10/25 12:0 a.m.•9 views

MED - Royalty system couples receiving address and collection request address, which may cause marketplaces to not be able to collect.

Lines of code Vulnerability details Description Royalties are managed in PA1D.sol. Owner configures several addresses which will get percentages of tokens owned by the contract. However, to receive the payout caller must be one of the eligible addresses, or the owner. This is an issue because the...

6.7AI score
Exploits0
Code423n4
Code423n4
•added 2022/10/25 12:0 a.m.•8 views

Insufficient validation in enforcer's OnERC20Received() callback may lead to loss of funds in implementations.

Lines of code Vulnerability details Description HolographERC20's onERC20Received is presumably a callback that is called when the Holographer receives tokens. Its implementation is: if isEventRegisteredHolographERC20Event.beforeOnERC20Received requireSourceERC20.beforeOnERC20Receivedaccount,...

6.7AI score
Exploits0
Code423n4
Code423n4
•added 2022/10/25 12:0 a.m.•13 views

If user sets a low gasPrice the operator would have to choose between being locked out of the pod or executing the job anyway

Lines of code Vulnerability details During the beaming process the user compensates the operator for the gas he has to pay by sending some source-chain-native-tokens via hToken. The amount he has to pay is determined according to the gasPrice set by the user, which is supposed to be the maximum g...

7AI score
Exploits0
Code423n4
Code423n4
•added 2022/10/25 12:0 a.m.•6 views

_payoutToken() breaks if tokenAddress is USDT - for Ethereum contracts.

Lines of code Vulnerability details If USDT is used for a sale at some point - either through a direct sale on the NFT collection, or sent to the collection from a marketplace sale - it will remain in the contract, as getTokenPayoutaddressUSDT calls systematically revert: on Ethereum, USDT.transf...

6.8AI score
Exploits0
Code423n4
Code423n4
•added 2022/10/25 12:0 a.m.•9 views

MED: leak of value when interacting with an ERC721 enforcer contract

Lines of code Vulnerability details Description HolographERC721.sol is an enforcer of the ERC721 standard. In its fallback function, it calls the actual implementation in order to handle additional logic. If Holographer is called with no calldata and some msg.value, the call will reach the receiv...

6.9AI score
Exploits0
Code423n4
Code423n4
•added 2022/10/25 12:0 a.m.•9 views

An attacker can lock operator out of the pod by setting gas limit that's higher than the block gas limit of dest chain

Lines of code Vulnerability details When a beaming job is executed, there's a requirement that the gas left would be at least as the gasLimit set by the user. Given that there's no limit on the gasLimit the user can set, a user can set the gasLimit to amount that's higher than the block gas limit...

7AI score
Exploits0
Code423n4
Code423n4
•added 2022/10/25 12:0 a.m.•8 views

Adversary can cause malicious slashing of operators by creating malicous token and setting gas limit above chain block gas limit

Lines of code Vulnerability details Impact Operators maliciously slashed Proof of Concept A user can create a malicious token that when called by anyone other than themselves and the bridge use an extreme amount of gas. They create a bridge request with a gas limit higher than the block limit. If...

7.1AI score
Exploits0
Code423n4
Code423n4
•added 2022/10/25 12:0 a.m.•6 views

Users can create beam request for a destination chain without paying a fee.

Lines of code Vulnerability details Impact When a user creates a beam request for a destination chain, the user can input zero as a value for gasLimit. With this, the user is able to make the request without paying any fees to Hologram since messagingModule.getHlgFeetoChain, gasLimit, gasPrice;...

6.8AI score
Exploits0
Total number of security vulnerabilities10190