CVE-2024-32873: evmos allows transferring unvested tokens after delegations
Impact This advisory has been created to address the following vulnerabilities found in the Evmos codebase and affecting vesting accounts. Wrong spendable balance computation The spendable balance is not updated properly when delegating vested tokens. The following example help in describing the issue: - Given a clawback vesting account with a starting 15M vesting schedule. The initial spendable balance is 0.
Published Jun 6, 2024 · Updated Aug 12, 2024
Affected packages
github.com/evmos/evmos/v17
- Ecosystem
- Go
- Affected
- <= 17.0.1
- Fixed in
- 18.0.0
- Check
go list -m github.com/evmos/evmos/v17
github.com/evmos/evmos/v16
- Ecosystem
- Go
- Affected
- <= 16.0.4
- Fixed in
- 18.0.0
- Check
go list -m github.com/evmos/evmos/v16
github.com/evmos/evmos/v15
- Ecosystem
- Go
- Affected
- <= 15.0.0
- Fixed in
- 18.0.0
- Check
go list -m github.com/evmos/evmos/v15
github.com/evmos/evmos/v14
- Ecosystem
- Go
- Affected
- <= 14.1.0
- Fixed in
- 18.0.0
- Check
go list -m github.com/evmos/evmos/v14
github.com/evmos/evmos/v13
- Ecosystem
- Go
- Affected
- <= 13.0.2
- Fixed in
- 18.0.0
- Check
go list -m github.com/evmos/evmos/v13
github.com/evmos/evmos/v12
- Ecosystem
- Go
- Affected
- <= 12.1.6
- Fixed in
- 18.0.0
- Check
go list -m github.com/evmos/evmos/v12
github.com/evmos/evmos/v11
- Ecosystem
- Go
- Affected
- <= 11.0.2
- Fixed in
- 18.0.0
- Check
go list -m github.com/evmos/evmos/v11
github.com/evmos/evmos/v10
- Ecosystem
- Go
- Affected
- <= 10.0.1
- Fixed in
- 18.0.0
- Check
go list -m github.com/evmos/evmos/v10
github.com/evmos/evmos/v9
- Ecosystem
- Go
- Affected
- <= 9.1.0
- Fixed in
- 18.0.0
- Check
go list -m github.com/evmos/evmos/v9
github.com/evmos/evmos/v8
- Ecosystem
- Go
- Affected
- <= 8.2.3
- Fixed in
- 18.0.0
- Check
go list -m github.com/evmos/evmos/v8
github.com/evmos/evmos/v7
- Ecosystem
- Go
- Affected
- <= 7.0.0
- Fixed in
- 18.0.0
- Check
go list -m github.com/evmos/evmos/v7
github.com/evmos/evmos/v6
- Ecosystem
- Go
- Affected
- <= 6.0.4
- Fixed in
- 18.0.0
- Check
go list -m github.com/evmos/evmos/v6
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
Impact
This advisory has been created to address the following vulnerabilities found in the Evmos codebase and affecting vesting accounts.
Wrong spendable balance computation
The spendable balance is not updated properly when delegating vested tokens. The following example help in describing the issue:
- Given a clawback vesting account with a starting
15Mvesting schedule. The initial spendable balance is0. - Time passes and
5Mare vested. The spendable balance is now5M. - The account delegate
5M. The spendable balance should be0, but returns5M - The account can send
5Mto another account.
The issue allowed a clawback vesting account to anticipate the release of unvested tokens.
Missing precompile checks
Preliminary checks on actions computed by the clawback vesting accounts are performed in the ante handler. Evmos core, implements two different ante handlers: one for Cosmos transactions and one for Ethereum transactions. Checks performed on the two implementation are different.
The vulnerability discovered allowed a clawback account to bypass Cosmos ante handler checks by sending an Ethereum transaction targeting a precompile used to interact with a Cosmos SDK module.
Missing create validator check
This vulnerability allowed a user to create a validator using vested tokens to deposit the self-bond.
Patches
- The spendable balance function has been fixed correcting the
TrackDelegationfunction. - The checks for the staking module, for the delegation and the create validator, has been moved into the
MsgServerof a wrapper around the Cosmos SDK staking module.
The issues have been patched in versions >=V18.0.0.
References
For more information
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]](mailto:[email protected]) for security questions
References
- https://github.com/evmos/evmos/security/advisories/GHSA-pxv8-qhrh-jc7v
- https://github.com/evmos/evmos/commit/b2a09ca66613d8b04decd3f2dcba8e1e77709dcb
- https://nvd.nist.gov/vuln/detail/CVE-2024-32873
- https://pkg.go.dev/vuln/GO-2024-2891
- https://nvd.nist.gov/vuln/detail/CVE-2024-37158
- https://nvd.nist.gov/vuln/detail/CVE-2024-37159
- https://github.com/advisories/GHSA-pxv8-qhrh-jc7v
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More Go vulnerabilities
All Go entriesCVE-2024-37153
Contract balance not updating correctly after interchain transaction
high7.5Jun 6, 2024CVE-2024-37154
Evmos allows unvested token delegations
medium5.3No fixJun 6, 2024GHSA-m99c-q26r-m7m7
Evmos vulnerable to unauthorized account creation with vesting module
mediumNo fixApr 17, 2024GHSA-v6rw-hhgg-wc4x
Evmos vulnerable to DOS and transaction fee expropiation through Authz exploit
critical9.1Apr 17, 2024CVE-2024-32644
Evmos transaction execution not accounting for all state transition after interaction with precompiles
critical9.1No fixApr 10, 2024
