GitHub Advisoryadvisory · Go

GHSA-pxv8-qhrh-jc7v evmos allows transferring unvested tokens after delegations

LOW Published 2024-06-06 Modified 2024-09-06 Official page ↗
Aliases
CVE-2024-32873
Ecosystem
Go
Packages
github.com/evmos/evmos/v17, github.com/evmos/evmos/v16, github.com/evmos/evmos/v15, github.com/evmos/evmos/v14, github.com/evmos/evmos/v13, github.com/evmos/evmos/v12, github.com/evmos/evmos/v11, github.com/evmos/evmos/v10, github.com/evmos/evmos/v9, github.com/evmos/evmos/v8, github.com/evmos/evmos/v7, github.com/evmos/evmos/v6
Severity
Low
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:N/A:L
Weaknesses
CWE-682
Reviewed
2024-06-06

Affected packages

• Go github.com/evmos/evmos/v17: < 18.0.0 → fixed in 18.0.0 • Go github.com/evmos/evmos/v16: < 18.0.0 → fixed in 18.0.0 • Go github.com/evmos/evmos/v15: < 18.0.0 → fixed in 18.0.0 • Go github.com/evmos/evmos/v14: < 18.0.0 → fixed in 18.0.0 • Go github.com/evmos/evmos/v13: < 18.0.0 → fixed in 18.0.0 • Go github.com/evmos/evmos/v12: < 18.0.0 → fixed in 18.0.0 • Go github.com/evmos/evmos/v11: < 18.0.0 → fixed in 18.0.0 • Go github.com/evmos/evmos/v10: < 18.0.0 → fixed in 18.0.0 • Go github.com/evmos/evmos/v9: < 18.0.0 → fixed in 18.0.0 • Go github.com/evmos/evmos/v8: < 18.0.0 → fixed in 18.0.0 • Go github.com/evmos/evmos/v7: < 18.0.0 → fixed in 18.0.0 • Go github.com/evmos/evmos/v6: < 18.0.0 → fixed in 18.0.0

Description

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`. • Time passes and `5M` are vested. The spendable balance is now `5M`. • The account delegate `5M`. The spendable balance should be `0`, but returns `5M` • The account can send `5M` to 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 `TrackDelegation` function. • The checks for the staking module, for the delegation and the create validator, has been moved into the `MsgServer` of a wrapper around the Cosmos SDK staking module. The issues have been patched in versions >=V18.0.0. References 1. Evmos vesting module 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] for security questions

Related

Alias · CVE (1)

  • CVE-2024-32873 Evmos is the Ethereum Virtual Machine (EVM) Hub on the Cosmos Network. vulnerability

Weakness · CWE (1)

  • CWE-682 Incorrect Calculation weakness

References