Unchecked return value from low-level call()
The contract does not check the return value of a low-level call, so if the call fails, Ether can become locked in the contract. An attacker could cause this by setting the intermediate token to a contract that fails when wrapping the Ether amount.
Submitted by JMukesh, also found by certora
Impact
The return value of the low-level call is not checked, so if the call fails, the Ether will be locked in the contract. If the low level is used to prevent blocking operations, consider logging failed calls.
Proof of Concept
Recommended Mitigation Steps
add condition to check return value
loki-sama (Amun) confirmed and disagreed with severity
0xleastwood (Judge) commented:
Nice find! I think this could be marked as
mediumas it leaks value from the protocol but it doesn’t result in assets being lost directly. It requires_INTERMEDIATE_TOKENto point to a contract which fails upon wrapping the ETH amount.
So considering that
_INTERMEDIATE_TOKENmust be improperly set, I will mark this asmedium.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the contract uses a low-level call to send Ether but does not verify its return value, so a failed call leaves Ether stuck.
Impact
If the intermediate token is set to a contract that fails when wrapping the Ether amount, Ether could be locked in the contract, but assets are not lost directly.
What the attacker needed
Intermediate token set to a failing contract
The fix
The contract should be fixed by adding a condition to check the return value of the low-level call.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
A low-level call is a way for a smart contract to send Ether or call another contract without automatic error checking. If the call fails and the contract does not check the result, the Ether may be stuck. Here, the contract sends Ether but ignores whether it succeeded, so a failure could lock funds.
What is Smart contracts?
Flaws in on-chain code that let an attacker drain funds, freeze them or break the protocol's accounting.