{"id":"GHSA-pxv8-qhrh-jc7v","summary":"evmos allows transferring unvested tokens after delegations","details":"## Impact\n\nThis advisory has been created to address the following vulnerabilities found in the Evmos codebase and affecting vesting accounts.\n\n### Wrong spendable balance computation\n\nThe spendable balance is not updated properly when delegating vested tokens. The following example help in describing the issue:\n- Given a clawback vesting account with a starting `15M` vesting schedule. The initial spendable balance is `0`.\n- Time passes and `5M` are vested. The spendable balance is now `5M`.\n- The account delegate `5M`. The spendable balance should be `0`, but returns `5M`\n- The account can send `5M` to another account.\n\nThe issue allowed a clawback vesting account to anticipate the release of unvested tokens.\n\n### Missing precompile checks\n\nPreliminary 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.\n\nThe 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.\n\n### Missing create validator check\n\nThis vulnerability allowed a user to create a validator using vested tokens to deposit the self-bond.\n\n## Patches\n\n- The spendable balance function has been fixed correcting the `TrackDelegation` function.\n- 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. \n\nThe issues have been patched in versions \u003e=V18.0.0.\n\n## References\n1. [Evmos vesting module](https://docs.evmos.org/protocol/modules/vesting)\n\n## For more information\nIf you have any questions or comments about this advisory:\n\nReach out to the Core Team in [Discord](https://discord.gg/evmos)\nOpen a discussion in [evmos/evmos](https://github.com/evmos/evmos/discussions)\nEmail us at [security@evmos.org](mailto:security@evmos.org) for security questions","aliases":["CVE-2024-32873","CVE-2024-37158","CVE-2024-37159","GO-2024-2891","GO-2024-2926","GO-2024-2927"],"modified":"2026-09-10T03:50:15.693743484Z","published":"2024-06-06T18:21:05Z","database_specific":{"github_reviewed":true,"github_reviewed_at":"2024-06-06T18:21:05Z","nvd_published_at":"2024-06-06T19:15:56Z","cwe_ids":["CWE-682"],"severity":"LOW"},"references":[{"type":"WEB","url":"https://github.com/evmos/evmos/security/advisories/GHSA-pxv8-qhrh-jc7v"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-32873"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-37158"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-37159"},{"type":"WEB","url":"https://github.com/evmos/evmos/commit/b2a09ca66613d8b04decd3f2dcba8e1e77709dcb"},{"type":"PACKAGE","url":"https://github.com/evmos/evmos"},{"type":"WEB","url":"https://pkg.go.dev/vuln/GO-2024-2891"}],"affected":[{"package":{"name":"github.com/evmos/evmos/v17","ecosystem":"Go","purl":"pkg:golang/github.com/evmos/evmos/v17"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"18.0.0"}]}],"database_specific":{"last_known_affected_version_range":"\u003c= 17.0.1","source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2024/06/GHSA-pxv8-qhrh-jc7v/GHSA-pxv8-qhrh-jc7v.json"}},{"package":{"name":"github.com/evmos/evmos/v16","ecosystem":"Go","purl":"pkg:golang/github.com/evmos/evmos/v16"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"18.0.0"}]}],"database_specific":{"last_known_affected_version_range":"\u003c= 16.0.4","source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2024/06/GHSA-pxv8-qhrh-jc7v/GHSA-pxv8-qhrh-jc7v.json"}},{"package":{"name":"github.com/evmos/evmos/v15","ecosystem":"Go","purl":"pkg:golang/github.com/evmos/evmos/v15"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"18.0.0"}]}],"database_specific":{"last_known_affected_version_range":"\u003c= 15.0.0","source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2024/06/GHSA-pxv8-qhrh-jc7v/GHSA-pxv8-qhrh-jc7v.json"}},{"package":{"name":"github.com/evmos/evmos/v14","ecosystem":"Go","purl":"pkg:golang/github.com/evmos/evmos/v14"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"18.0.0"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2024/06/GHSA-pxv8-qhrh-jc7v/GHSA-pxv8-qhrh-jc7v.json","last_known_affected_version_range":"\u003c= 14.1.0"}},{"package":{"name":"github.com/evmos/evmos/v13","ecosystem":"Go","purl":"pkg:golang/github.com/evmos/evmos/v13"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"18.0.0"}]}],"database_specific":{"last_known_affected_version_range":"\u003c= 13.0.2","source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2024/06/GHSA-pxv8-qhrh-jc7v/GHSA-pxv8-qhrh-jc7v.json"}},{"package":{"name":"github.com/evmos/evmos/v12","ecosystem":"Go","purl":"pkg:golang/github.com/evmos/evmos/v12"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"18.0.0"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2024/06/GHSA-pxv8-qhrh-jc7v/GHSA-pxv8-qhrh-jc7v.json","last_known_affected_version_range":"\u003c= 12.1.6"}},{"package":{"name":"github.com/evmos/evmos/v11","ecosystem":"Go","purl":"pkg:golang/github.com/evmos/evmos/v11"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"18.0.0"}]}],"database_specific":{"last_known_affected_version_range":"\u003c= 11.0.2","source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2024/06/GHSA-pxv8-qhrh-jc7v/GHSA-pxv8-qhrh-jc7v.json"}},{"package":{"name":"github.com/evmos/evmos/v10","ecosystem":"Go","purl":"pkg:golang/github.com/evmos/evmos/v10"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"18.0.0"}]}],"database_specific":{"last_known_affected_version_range":"\u003c= 10.0.1","source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2024/06/GHSA-pxv8-qhrh-jc7v/GHSA-pxv8-qhrh-jc7v.json"}},{"package":{"name":"github.com/evmos/evmos/v9","ecosystem":"Go","purl":"pkg:golang/github.com/evmos/evmos/v9"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"18.0.0"}]}],"database_specific":{"last_known_affected_version_range":"\u003c= 9.1.0","source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2024/06/GHSA-pxv8-qhrh-jc7v/GHSA-pxv8-qhrh-jc7v.json"}},{"package":{"name":"github.com/evmos/evmos/v8","ecosystem":"Go","purl":"pkg:golang/github.com/evmos/evmos/v8"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"18.0.0"}]}],"database_specific":{"last_known_affected_version_range":"\u003c= 8.2.3","source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2024/06/GHSA-pxv8-qhrh-jc7v/GHSA-pxv8-qhrh-jc7v.json"}},{"package":{"name":"github.com/evmos/evmos/v7","ecosystem":"Go","purl":"pkg:golang/github.com/evmos/evmos/v7"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"18.0.0"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2024/06/GHSA-pxv8-qhrh-jc7v/GHSA-pxv8-qhrh-jc7v.json","last_known_affected_version_range":"\u003c= 7.0.0"}},{"package":{"name":"github.com/evmos/evmos/v6","ecosystem":"Go","purl":"pkg:golang/github.com/evmos/evmos/v6"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"18.0.0"}]}],"database_specific":{"last_known_affected_version_range":"\u003c= 6.0.4","source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2024/06/GHSA-pxv8-qhrh-jc7v/GHSA-pxv8-qhrh-jc7v.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:N/A:L"}]}