Skip to content

evmos allows transferring unvested tokens after delegations

Low severity GitHub Reviewed Published Jun 6, 2024 in evmos/evmos • Updated Aug 12, 2024

Package

gomod github.com/evmos/evmos/v10 (Go)

Affected versions

<= 10.0.1

Patched versions

18.0.0
gomod github.com/evmos/evmos/v11 (Go)
<= 11.0.2
18.0.0
gomod github.com/evmos/evmos/v12 (Go)
<= 12.1.6
18.0.0
gomod github.com/evmos/evmos/v13 (Go)
<= 13.0.2
18.0.0
gomod github.com/evmos/evmos/v14 (Go)
<= 14.1.0
18.0.0
gomod github.com/evmos/evmos/v15 (Go)
<= 15.0.0
18.0.0
gomod github.com/evmos/evmos/v16 (Go)
<= 16.0.4
18.0.0
gomod github.com/evmos/evmos/v17 (Go)
<= 17.0.1
18.0.0
gomod github.com/evmos/evmos/v6 (Go)
<= 6.0.4
18.0.0
gomod github.com/evmos/evmos/v7 (Go)
<= 7.0.0
18.0.0
gomod github.com/evmos/evmos/v8 (Go)
<= 8.2.3
18.0.0
gomod github.com/evmos/evmos/v9 (Go)
<= 9.1.0
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 security@evmos.org for security questions

References

@sandoche sandoche published to evmos/evmos Jun 6, 2024
Published to the GitHub Advisory Database Jun 6, 2024
Reviewed Jun 6, 2024
Published by the National Vulnerability Database Jun 6, 2024
Last updated Aug 12, 2024

Severity

Low

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
Low
User interaction
Required
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
Low

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:N/A:L

EPSS score

0.045%
(15th percentile)

Weaknesses

CVE ID

CVE-2024-32873

GHSA ID

GHSA-pxv8-qhrh-jc7v

Source code

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.