7.5 High
CVSS3
Attack Vector
NETWORK
Attack Complexity
LOW
Privileges Required
NONE
User Interaction
NONE
Scope
UNCHANGED
Confidentiality Impact
NONE
Integrity Impact
HIGH
Availability Impact
NONE
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
0.0004 Low
EPSS
Percentile
9.1%
Short summary of the problem. Make the impact and severity as clear as possible. For example: An unsafe deserialization vulnerability allows any unauthenticated user to execute arbitrary code on the server.
We discovered a bug walking through how to liquid stake using Safe which itself is a contract. The bug only appears when there is a local state change together with an ICS20 transfer in the same function and uses the contract’s balance, that is using the contract address as the sender
parameter in an ICS20 transfer using the ICS20 precompile
// This function does not reduce the contract balance correctly but liquid stakes correctly
function transfer(
string memory sourcePort,
string memory sourceChannel,
string memory denom,
uint256 amount,
string memory receiver,
string memory evmosReceiver
) external returns (uint64 nextSequence) {
counter += 1; # Only happens when there is a local state update together with an ICS20 Transfer
Height memory timeoutHeight = Height(100, 100);
string memory memo = buildLiquidStakeMemo(receiver, evmosReceiver);
return ICS20_CONTRACT.transfer(
sourcePort,
sourceChannel,
denom,
amount,
address(this), # this is the sender address which is the contract
receiver,
timeoutHeight,
0,
memo
);
}
This is in essence the “infinite money glitch” allowing contracts to double the supply of Evmos after each transaction.
Based on ImmuneFi Severity Classification System the severity was evaluated to Critical
since the attack could have lead to create new supply of EVMOS and therefore lead to Direct loss of funds’s value.
The issue has been patched in versions >=V18.1.0.
If you have any questions or comments about this advisory:
Reach out to the Core Team in Discord
Open a discussion in evmos/evmos
Email us at [email protected] for security questions