GHSA-pxv8-qhrh-jc7v

Suggest an improvement
Source
https://github.com/advisories/GHSA-pxv8-qhrh-jc7v
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2024/06/GHSA-pxv8-qhrh-jc7v/GHSA-pxv8-qhrh-jc7v.json
JSON Data
https://api.test.osv.dev/v1/vulns/GHSA-pxv8-qhrh-jc7v
Aliases
Related
Published
2024-06-06T18:21:05Z
Modified
2025-01-08T16:26:49.050325Z
Severity
  • 3.5 (Low) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:N/A:L CVSS Calculator
Summary
evmos allows transferring unvested tokens after delegations
Details

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

Database specific
{
    "nvd_published_at": "2024-06-06T19:15:56Z",
    "cwe_ids": [
        "CWE-682"
    ],
    "severity": "LOW",
    "github_reviewed": true,
    "github_reviewed_at": "2024-06-06T18:21:05Z"
}
References

Affected packages

Go / github.com/evmos/evmos/v17

Package

Name
github.com/evmos/evmos/v17
View open source insights on deps.dev
Purl
pkg:golang/github.com/evmos/evmos/v17

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
18.0.0

Database specific

{
    "last_known_affected_version_range": "<= 17.0.1"
}

Go / github.com/evmos/evmos/v16

Package

Name
github.com/evmos/evmos/v16
View open source insights on deps.dev
Purl
pkg:golang/github.com/evmos/evmos/v16

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
18.0.0

Database specific

{
    "last_known_affected_version_range": "<= 16.0.4"
}

Go / github.com/evmos/evmos/v15

Package

Name
github.com/evmos/evmos/v15
View open source insights on deps.dev
Purl
pkg:golang/github.com/evmos/evmos/v15

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
18.0.0

Database specific

{
    "last_known_affected_version_range": "<= 15.0.0"
}

Go / github.com/evmos/evmos/v14

Package

Name
github.com/evmos/evmos/v14
View open source insights on deps.dev
Purl
pkg:golang/github.com/evmos/evmos/v14

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
18.0.0

Database specific

{
    "last_known_affected_version_range": "<= 14.1.0"
}

Go / github.com/evmos/evmos/v13

Package

Name
github.com/evmos/evmos/v13
View open source insights on deps.dev
Purl
pkg:golang/github.com/evmos/evmos/v13

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
18.0.0

Database specific

{
    "last_known_affected_version_range": "<= 13.0.2"
}

Go / github.com/evmos/evmos/v12

Package

Name
github.com/evmos/evmos/v12
View open source insights on deps.dev
Purl
pkg:golang/github.com/evmos/evmos/v12

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
18.0.0

Database specific

{
    "last_known_affected_version_range": "<= 12.1.6"
}

Go / github.com/evmos/evmos/v11

Package

Name
github.com/evmos/evmos/v11
View open source insights on deps.dev
Purl
pkg:golang/github.com/evmos/evmos/v11

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
18.0.0

Database specific

{
    "last_known_affected_version_range": "<= 11.0.2"
}

Go / github.com/evmos/evmos/v10

Package

Name
github.com/evmos/evmos/v10
View open source insights on deps.dev
Purl
pkg:golang/github.com/evmos/evmos/v10

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
18.0.0

Database specific

{
    "last_known_affected_version_range": "<= 10.0.1"
}

Go / github.com/evmos/evmos/v9

Package

Name
github.com/evmos/evmos/v9
View open source insights on deps.dev
Purl
pkg:golang/github.com/evmos/evmos/v9

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
18.0.0

Database specific

{
    "last_known_affected_version_range": "<= 9.1.0"
}

Go / github.com/evmos/evmos/v8

Package

Name
github.com/evmos/evmos/v8
View open source insights on deps.dev
Purl
pkg:golang/github.com/evmos/evmos/v8

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
18.0.0

Database specific

{
    "last_known_affected_version_range": "<= 8.2.3"
}

Go / github.com/evmos/evmos/v7

Package

Name
github.com/evmos/evmos/v7
View open source insights on deps.dev
Purl
pkg:golang/github.com/evmos/evmos/v7

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
18.0.0

Database specific

{
    "last_known_affected_version_range": "<= 7.0.0"
}

Go / github.com/evmos/evmos/v6

Package

Name
github.com/evmos/evmos/v6
View open source insights on deps.dev
Purl
pkg:golang/github.com/evmos/evmos/v6

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
18.0.0

Database specific

{
    "last_known_affected_version_range": "<= 6.0.4"
}