Lucene search

K
githubGitHub Advisory DatabaseGHSA-PXV8-QHRH-JC7V
HistoryJun 06, 2024 - 6:21 p.m.

evmos allows transferring unvested tokens after delegations

2024-06-0618:21:05
CWE-682
GitHub Advisory Database
github.com
4
vesting accounts
spendable balance
delegation
ante handler
create validator
evmos core
security patch

3.5 Low

CVSS3

Attack Vector

NETWORK

Attack Complexity

LOW

Privileges Required

LOW

User Interaction

REQUIRED

Scope

UNCHANGED

Confidentiality Impact

NONE

Integrity Impact

NONE

Availability Impact

LOW

CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:N/A:L

4.3 Medium

AI Score

Confidence

High

0.0004 Low

EPSS

Percentile

9.1%

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

Affected configurations

Vulners
Node
evmosevmosRange6.0.4
OR
evmosevmosRange7.0.0
OR
evmosevmosRange8.2.3
OR
evmosevmosRange9.1.0
OR
evmosevmosRange10.0.1
OR
evmosevmosRange11.0.2
OR
evmosevmosRange12.1.6
OR
evmosevmosRange13.0.2
OR
evmosevmosRange14.1.0
OR
evmosevmosRange15.0.0
OR
evmosevmosRange16.0.4
OR
evmosevmosRange17.0.1

3.5 Low

CVSS3

Attack Vector

NETWORK

Attack Complexity

LOW

Privileges Required

LOW

User Interaction

REQUIRED

Scope

UNCHANGED

Confidentiality Impact

NONE

Integrity Impact

NONE

Availability Impact

LOW

CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:N/A:L

4.3 Medium

AI Score

Confidence

High

0.0004 Low

EPSS

Percentile

9.1%

Related for GHSA-PXV8-QHRH-JC7V