Lucene search
+L
Code423n4Recent

10190 matches found

Code423n4
Code423n4
•added 2023/09/14 12:0 a.m.•8 views

The current axelar router's implementation can't interact with any calls that requires native tokens

Lines of code Vulnerability details Impact Medium... this completely blocks off users that would need to call a contract and want to pass value to them, as they can't do this since the functions are not payable Proof of Concept See summary Additionally take a look at the Axelar's Router.sol and s...

7AI score
Exploits0
Code423n4
Code423n4
•added 2023/09/14 12:0 a.m.•5 views

Expired members can lose their tranche tokens if they call transferTrancheTokensToCentrifuge or transferTrancheTokensToEVM in PoolManager.sol

Lines of code Vulnerability details Impact User can call transferTrancheTokensToCentrifuge or transferTrancheTokensToEVM to transfer their tranche tokens to other chains, but no verifying is done to see if they are expired members or not on the source chain, which can cause loss of funds for some...

6.8AI score
Exploits0
Code423n4
Code423n4
•added 2023/09/14 12:0 a.m.•16 views

Relying on string comparisons to determine which parameter to update in the file() function is brittle and could lead to unintended consequences.

Lines of code Vulnerability details Impact This can allow unintentionally changing sensitive state variables Proof of Concept The vulnerability arises because: file relies on a simple string comparison of the what parameter to determine which state variable to update. A developer could accidental...

6.7AI score
Exploits0
Code423n4
Code423n4
•added 2023/09/14 12:0 a.m.•7 views

Not enough valid checks in the Factory.sol

Lines of code Vulnerability details Impact The LiquidityPoolFactory contract is used to deploy LiquidityPools through a controlled newLiquidityPool , however a vital check is omitted. The newLiquidityPool is first called in the PoolManager.sol but it is not restricted to just that, it can also be...

6.9AI score
Exploits0
Code423n4
Code423n4
•added 2023/09/14 12:0 a.m.•12 views

Allowance manipulation in UserEscrow struct leads to unauthorized token transfers due to overreliance on maximum allowance check

Lines of code Vulnerability details Summary The UserEscrow smart contract contains a vulnerability that can possibly allow unauthorized users to transfer tokens out of the contract. Specifically, an attacker can exploit this flaw by manipulating the allowances, thus enabling them to bypass the...

7.1AI score
Exploits0
Code423n4
Code423n4
•added 2023/09/14 12:0 a.m.•16 views

Vulnerability: An Attacker can steal Tranche Tokens and Drain the Pool / Contract: InvestmentManager.

Lines of code Vulnerability details Impact An Attacker can mint Tranche Tokens for free and use them to Drain the Pool and steal the user's money. Proof of Concept Let's imagine that some users deposit money in the pool and mint tranches but they didn't redeem/withdraw their tokens, one of the...

7AI score
Exploits0
Code423n4
Code423n4
•added 2023/09/14 12:0 a.m.•9 views

Any user can drain the escrow contract by calling decreaseDepositRequest with more amount than they deposited into the escrow while requesting.

Lines of code Vulnerability details Impact In the protocol, users submit deposit requests to the Centrifuge gateway for depositing assets into the Liquidity Pools. There is also a mechanism to decrease this deposit order by calling LiquidityPool::decreaseDepositRequest which decreases their depos...

6.7AI score
Exploits0
Code423n4
Code423n4
•added 2023/09/14 12:0 a.m.•8 views

possibility of reentrancy attack when poolManger.sol#Transfer called with malicious recipient contract address

Lines of code Vulnerability details Impact when users calls the transfer function in the poolManger.sol the transaction data will be send to the centrifuge chain first and then it will be back to the router and then direct it to thehandleTransfer function in poolManger.sol, user can make a...

6.7AI score
Exploits0
Code423n4
Code423n4
•added 2023/09/14 12:0 a.m.•11 views

Signature malleability in permit function

Lines of code Vulnerability details Impact In the ERC20 contract used to define the interface for tranche tokens the permit function uses ecrecover to verify a signature submitted by the token owner to approve an address to spend its tranche tokens. However there is a well known issue related to...

6.8AI score
Exploits0
Code423n4
Code423n4
•added 2023/09/14 12:0 a.m.•6 views

lack of failsafe mechanism to replay the failed transaction between source chain and destination chain. This would lead to loss of funds to user when transaction is failed.

Lines of code Vulnerability details Impact When the transaction fails in any of chain source or destination, it never be replayed. This would lead to loss of assets if the the transaction is target for token transfer. Similarly other issue can happen. Proof of Concept Centrifuge used the cross...

6.7AI score
Exploits0
Code423n4
Code423n4
•added 2023/09/14 12:0 a.m.•17 views

"Divide-by-Zero Risk in convertToShares Function"

Lines of code Vulnerability details Description The convertToShares function calculates the number of shares based on the provided assets and the "latestPrice" obtained from the liquidityPool. While the code may appear straightforward, there is a specific security concern related to divide-by-zer...

6.9AI score
Exploits0
Code423n4
Code423n4
•added 2023/09/14 12:0 a.m.•12 views

Malicious RestrictionManger can be used to verify Tranche Members

Lines of code Vulnerability details The ability to file a new Restriction Manger after deployment can actually be utilized by a rouge ward and deploy a malicious version of the RestrictionManger that implements almost the same thing as the originals, but just tweaked to return the SUCCESSMESSAGE...

7.2AI score
Exploits0
Code423n4
Code423n4
•added 2023/09/14 12:0 a.m.•13 views

Contract lacks proper error handling. Without meaningful error messages, it becomes difficult to identify the exact reasons for failures or unexpected behavior. Often leading end user astray.

Lines of code Vulnerability details Contract lacks proper error handling. Without meaningful error messages, it becomes difficult to identify the exact reasons for failures or unexpected behavior. Often leading end user astray. The code lacks proper error handling mechanisms, which can make it...

7.3AI score
Exploits0
Code423n4
Code423n4
•added 2023/09/14 12:0 a.m.•10 views

The executeScheduledRely function in the code allows any external caller to execute it without proper access control checks. This means that anyone can make themselves a ward on a contract without authorization, which poses a security risk.

Lines of code Vulnerability details Issue: The executeScheduledRely function in the code allows any external caller to execute it without proper access control checks. This means that anyone can make themselves a ward on a contract without authorization, which poses a security risk. Proof of...

7.3AI score
Exploits0
Code423n4
Code423n4
•added 2023/09/14 12:0 a.m.•9 views

LiquidityPool inflation attack

Lines of code Vulnerability details Bug Description The LiquidityPool uses an algorithm that converts prices to shares through a linear relationship. For instance, if there are 10,000 assets and 100 shares, then holding 100 assets should yield 1 share. However, a situation arises when investor...

7AI score
Exploits0
Code423n4
Code423n4
•added 2023/09/14 12:0 a.m.•11 views

transferIn() is susceptible to a front-running attack

Lines of code Vulnerability details Impact Another auth caller can exploit the vulnerability by executing front-running transactions using the source address that has just given allowance approval to the contract. This allows the attacker to acquire and increase the destination amount of the...

6.8AI score
Exploits0
Code423n4
Code423n4
•added 2023/09/14 12:0 a.m.•7 views

Unchecked Input

Lines of code Vulnerability details Impact Attackers can get the auth badge due to unchecked input vulnerability at the LiquidityPool The wardmsg.sender badge gives the attacker the highest role in the entire Centrifuge ecosystem, allowing the attacker to steal funds and cause DOS. Proof of Conce...

6.8AI score
Exploits0
Code423n4
Code423n4
•added 2023/09/14 12:0 a.m.•5 views

Potential Incorrect Domain Separator Generation in _calculateDomainSeparator Function

Lines of code Vulnerability details The calculateDomainSeparator function generates the EIP-712 domain separator using the contract's name and version. However, there is no explicit guarantee that the name has been set before calling this function, leading to an unreliable domain separator. Impac...

6.8AI score
Exploits0
Code423n4
Code423n4
•added 2023/09/14 12:0 a.m.•14 views

Unsafe message encode and decode for cross chain message transfer and in execution process through axelar

Lines of code Vulnerability details Impact The cross chain message passing is done through the axelar gateway contracts. To pass the message, the message has to be formatted abi.encode and sent to destination chain from source chain. In destination chain, through gateway contract, the received...

6.8AI score
Exploits0
Code423n4
Code423n4
•added 2023/09/14 12:0 a.m.•11 views

approve function can be frontrun and funds will be stolen as a result

Lines of code Vulnerability details Impact The user that gives allowances will lose funds. Proof of Concept In the file ERC20.sol there is a function approve. This function is problematic as it is susceptible to frontrunning attacks. PoC: Consider the following scenario: Alice calls the function...

6.7AI score
Exploits0
Code423n4
Code423n4
•added 2023/09/14 12:0 a.m.•13 views

Transactions could be frontrun to deposit assets and collect shares between the deposit request and collection

Lines of code Vulnerability details Impact Attacker can spoof deposit to get free shares. Proof of Concept requestDeposit - Requests a deposit, locks up the assets. collectDeposit - Collects the shares after deposit execution. The vulnerability arises because: requestDeposit locks up the assets,...

6.8AI score
Exploits0
Code423n4
Code423n4
•added 2023/09/14 12:0 a.m.•9 views

Assumptions are currently made that prices would forever be positive

Lines of code Vulnerability details Impact Neglecting the potential for negative asset prices can lead to inaccurate value representation in the Liquidity Pool, possibly affecting calculations related to assets and tokens. It's crucial to note that the value of an asset, even if negative in the...

6.8AI score
Exploits0
Code423n4
Code423n4
•added 2023/09/14 12:0 a.m.•6 views

https://github.com/code-423n4/2023-09-centrifuge/blob/main/src/InvestmentManager.sol#L467-L480

Lines of code Vulnerability details Impact In this function InvestmentManager.deposit, the require statement calls the lPool.transferFrom function with an arbitrary from address. This means that the attacker can control who the tokens are transferred from. Proof of Concept Tools Used manuel revie...

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

Users may not redeem the their tranche tokens and suffer loss.

Lines of code Vulnerability details Impact In case of the stablecoin depegging, users may may not redeem the their tranche tokens and suffer loss. Proof of Concept A tranche allows multiple stablecoins to be the currencies that users can deposit to get the tranche tokens. An example would be a...

6.8AI score
Exploits0
Code423n4
Code423n4
•added 2023/09/14 12:0 a.m.•12 views

requestDeposit and requestRedeem do not allow for any price guarantee, opening users to sandwich attacks and other losses

Lines of code Vulnerability details Impact Request functions take only the desired input amount as a parameter, giving no way for the caller to control the fulfilment price. The price is decided by the Centrifuge mainnet only. function requestDeposituint256 assets, address owner; function...

6.7AI score
Exploits0
Code423n4
Code423n4
•added 2023/09/14 12:0 a.m.•15 views

No gas payment is done before calling the callContract in the Router.sol

Lines of code Vulnerability details Impact In the Axelar documentation it is specified that before calling callContract or callContractWithToken the user needs to first prepay the relayers gas fee on the source chain, but since the functions are not payable, nor does call...

6.8AI score
Exploits0
Code423n4
Code423n4
•added 2023/09/14 12:0 a.m.•11 views

There is no concept of a requestDeposit, requestRedeem receipt made on the source chain, resulting in no recovery proces escrowed funds in the event of bridge or Centrifuge fall.

Lines of code Vulnerability details Impact There is no kind of request receipt on the EVM chain at all. The InvenstmentManagerrequestDeposit simply puts users tokens in the escrow and then the request gets routed to the Gateway and later to the outgoingRouter. The flow goes as follows 1.Buyer cal...

6.7AI score
Exploits0
Code423n4
Code423n4
•added 2023/09/14 12:0 a.m.•9 views

Unchecked Minting

Lines of code Vulnerability details Impact There is a possibility, an attacker can force minting of tokens to self or any other diluting the token value and stealing funds in the process Proof of Concept Here is a step-by-step process The attacker calls the transferFrom function with msg.data...

6.8AI score
Exploits0
Code423n4
Code423n4
•added 2023/09/14 12:0 a.m.•9 views

Restriction Manager does not check the source address

Lines of code Vulnerability details Impact The detectTransferRestriction takes in all the necessary parameters: function detectTransferRestrictionaddress from, address to, uint256 value public view returns uint8 However it only performs a check on the address to The restriction used here is...

6.8AI score
Exploits0
Code423n4
Code423n4
•added 2023/09/14 12:0 a.m.•18 views

An attacker can drain all the tokens from UserEscrow contract.

Lines of code Vulnerability details Impact An user who is allowed to invest can maliciously drain all the tokens from the UserEscrow contract from decreaseDepositRequest and decreaseRedeemRequest of LiquidityPool.sol contract. Both functions are first send to the router and when the call is...

6.8AI score
Exploits0
Code423n4
Code423n4
•added 2023/09/14 12:0 a.m.•9 views

previewWithdraw doesn't round up the asset amount leading to confusion when external protocols integrate with the vaults of the protocol

Lines of code Vulnerability details Impact Protocols, that integrate with Centrifuge liquidity pools may wrongly assume that withdraw rounds the amount up as per the ERC-4626 specification leading to a wide array or issues for both parties. Proof of Concept The following is stated in the EIP's...

6.8AI score
Exploits0
Code423n4
Code423n4
•added 2023/09/14 12:0 a.m.•10 views

The Restriction Manager does not completely implement ERC1404 which leads to account that are supposed to be restricted actually have access to do with their tokens as they see fit

Lines of code Vulnerability details Impact Medium, contract's intended logic is for blacklisted users not to be able to interact with their system so as to follow rules set by regulationary bodies in the case where a user does anything that warrants them to be blacklisted, but this is clearly...

6.5AI score
Exploits0
Code423n4
Code423n4
•added 2023/09/14 12:0 a.m.•9 views

Already allowed pool currency can not be removed

Lines of code Vulnerability details Impact Already allowed pool currency can not be removed. Once a currency is allowed, it can not be removed. Most of the time, the currency will be a stablecoin but in cases where the stablecoin depegs, as seen with USDC three months ago, new liquidity pools for...

6.8AI score
Exploits0
Code423n4
Code423n4
•added 2023/09/14 12:0 a.m.•11 views

Access Control Dependency on msg.sender: The onlyGateway modifier relies solely on msg.sender for access control. If the address of the gateway contract is compromised or manipulated, it can lead to unauthorized access to critical functions within the contract.

Lines of code Vulnerability details Access Control Dependency on msg.sender Impact: The onlyGateway modifier relies solely on msg.sender for access control. If the address of the gateway contract is compromised or manipulated, it can lead to unauthorized access to critical functions within the...

6.9AI score
Exploits0
Code423n4
Code423n4
•added 2023/09/14 12:0 a.m.•7 views

Owners having valid permits might not be able to deposit or redeem assets/shares due to incorrect order of address validation in _isValidSignature

Lines of code Vulnerability details Proof of Concept requestDepositWithPermit requests asset deposit for a receiver to be included in the next epoch execution with a permit option. requestRedeemWithPermit request share redemption for a receiver to be included in the next epoch execution with a...

6.9AI score
Exploits0
Code423n4
Code423n4
•added 2023/09/14 12:0 a.m.•19 views

LiquidityPool.sol doesn't respect fully EIP 4626

Lines of code Vulnerability details Impact The EIP-4626 states that the function previewMint and previewWithdraw should be rounded up always, but that is not the case in the InvestmentManager.sol which makes it not fully compliant. Proof of Concept As can be seen by EIP-4626 the function...

6.8AI score
Exploits0
Code423n4
Code423n4
•added 2023/09/14 12:0 a.m.•8 views

InvestmentManager.requestDeposit Arbitrary send erc20

Lines of code Vulnerability details Impact InvestmentManager.requestDeposit. In this function, the SafeTransferLib.safeTransferFrom function is called with an arbitrary from address. This means that the attacker can control who the tokens are transferred from. Proof of Concept Tools Used manual...

6.9AI score
Exploits0
Code423n4
Code423n4
•added 2023/09/14 12:0 a.m.•15 views

Allowing price updates once in an epoch is extremely risky and open windows to a lot of issues

Lines of code Vulnerability details Impact Protocol currently knows about how this could be an effect, since the comments to both previewDeposit and convertToShares suggest that any difference attached to this should be considered slippage, but measures are not taken to ensure that this slippage ...

6.7AI score
Exploits0
Code423n4
Code423n4
•added 2023/09/14 12:0 a.m.•9 views

potential overflow in max.Deposit&maxMint; and max.redeem&max;.withdraw

Lines of code Vulnerability details Impact there is potential overflow in max.deposit and max.mint Proof of Concept there is only way to decrease max.deposit and max.mint is deposit to be excuted . function deposituint128 trancheTokenAmount, uint128 currencyAmount, address liquidityPool, address...

7.1AI score
Exploits0
Code423n4
Code423n4
•added 2023/09/14 12:0 a.m.•12 views

lack of an ownership transfer mechanism

Lines of code Vulnerability details Issue: The code does not have a mechanism to transfer ownership of the contract. In the current implementation, once deployed, the contract owner's address cannot be changed. This can be problematic for contract maintenance and security, as it restricts the...

7.1AI score
Exploits0
Code423n4
Code423n4
•added 2023/09/14 12:0 a.m.•10 views

Rouge ward can remove auth permission from other wards and then remove themselves

Lines of code Vulnerability details In a protocol, the deny function is used to remove the ward permissions from an address. This is actually a serious thing to consider that can actually occur, if a ward contract or account is obtained and other wards are not aware, the rogue ward can actually...

6.9AI score
Exploits0
Code423n4
Code423n4
•added 2023/09/11 12:0 a.m.•8 views

To protect the contract in case of hacking or detection of incorrect operation, it is necessary to add pause and blacklist functions

Lines of code Vulnerability details Impact Cases of hacking and self-identification of errors in contact often occur. To protect the contract in such a case, the pause and blacklist functions in the contract are usually used. This would provide protection for the DelegateToken.sol contract in cas...

6.7AI score
Exploits0
Code423n4
Code423n4
•added 2023/09/11 12:0 a.m.•6 views

create function will DoS with ERC1155s.

Lines of code Vulnerability details Impact ERC1155 tokens can never be used. Proof of Concept If we look at the create function in the delegateToken contract we can see the line : TransferHelpers.checkAndPullByTypeerc1155PullAuthorization, delegateInfo; this line calls the...

6.9AI score
Exploits0
Code423n4
Code423n4
•added 2023/09/11 12:0 a.m.•4 views

"rights" stored in memory is overwriting the memory block storing "from"

Lines of code Vulnerability details Impact Detailed description of the impact of this finding. Expected code should keccak over packed encoding of rights,from,to but as 'rights' values are overwriting 'from' values. So values available for encoding is not as expected. Proof of Concept Provide...

7.3AI score
Exploits0
Code423n4
Code423n4
•added 2023/09/11 12:0 a.m.•8 views

delegate ID could differ from the expected order hash if the order hash was manipulated

Lines of code Vulnerability details Impact A malicious user could create an order hash that does not match the actual order data. When the delegate token is created, the actualDelegateId will be different than the requestedDelegateId calculated from the manipulated createOrderHash. But the check...

7AI score
Exploits0
Code423n4
Code423n4
•added 2023/09/11 12:0 a.m.•9 views

Unchecked token transfer

Lines of code Vulnerability details Impact Unchecked token transfer Proof of Concept Since the contract will work with many different ERC721 tokens, and not all of them are based, for instance, on the OZ ERC721 token contract. And some tokens can return False instead of reverting a transaction in...

6.9AI score
Exploits0
Code423n4
Code423n4
•added 2023/09/11 12:0 a.m.•5 views

Protocols does not work with fee-on-transfer ERC20 tokens

Lines of code Vulnerability details Impact The protocol does not work with fee-on-transfer ERC20 tokens. When this type of token is escrowed, the amount is sent to the DelegateToken contract. After that the underlying amount delegateInfo.amount is stored in the...

6.7AI score
Exploits0
Code423n4
Code423n4
•added 2023/09/11 12:0 a.m.•8 views

The tokenType is concatenated rather than tightly integrated. An attacker could manipulate just the type byte of the hash.

Lines of code Vulnerability details Impact The attacker can create an unintended type of order and asset transfer. Proof of Concept The tokenType is concatenated rather than tightly integrated. An attacker could manipulate just the type byte of the hash. The issue is that the tokenType is...

6.8AI score
Exploits0
Code423n4
Code423n4
•added 2023/09/11 12:0 a.m.•7 views

test dupes medium

No description provided. --- The text was updated successfully, but these errors were encountered: All reactions...

7AI score
Exploits0
Code423n4
Code423n4
•added 2023/09/11 12:0 a.m.•16 views

getActiveTickIndex returns wrong index

Lines of code Vulnerability details To find a tick that's above price ie its only underlying is the base token, getActiveTickIndex should not if baseTokenIsToken0 && amt0 == 0 || !baseTokenIsToken0 && amt0 == 0 return tickIndex; it should if baseTokenIsToken0 && amt1 == 0 || !baseTokenIsToken0 &&...

6.9AI score
Exploits0
Total number of security vulnerabilities10190