# GHSA-m99c-q26r-m7m7: Evmos vulnerable to unauthorized account creation with vesting module

> Attackers can front-run contract deployments by creating vesting accounts at deterministic addresses, preventing smart contract uploads.

- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** No
- **Published:** 17 Apr 2024
- **Also known as:** GO-2024-2731

## What is GHSA-m99c-q26r-m7m7?

GHSA-m99c-q26r-m7m7 is a vulnerability in github.com/evmos/evmos, published on 17 Apr 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

### Impact
_What kind of vulnerability is it? Who is impacted?_

Using the vesting module, a malicious attacker can create a new vesting account at a given
address, before a contract is created on that address.

Addresses of smart contracts deployed to the EVM are deterministic. Therefore, it would be possible for an attacker to front-run a contract creation and create a vesting account at that address. 
When an address has been initialized without any contract code deployed to it, it will not be possible to upload any afterwards. In the described attack, this would mean that a malicious actor could prevent smart contracts from being deployed correctly.

In order to remediate this, an alternative user flow is being implemented for the vesting module:
- only the account receiving the vesting funds will be able to create such an account by calling the `CreateClawbackVestingAccount` method and defining a funder address
- vesting and lockup periods can then be created by that funder address using `FundClawbackAccount`

### Patches
_Has the problem been patched? What versions should users upgrade to?_

### Workarounds
_Is there a way for users to fix or remediate the vulnerability without upgrading?_

### References
_Are there any links users can visit to find out more?_

## Which versions are affected by GHSA-m99c-q26r-m7m7?

17 open source packages ship an affected version, including github.com/evmos/evmos/v13, github.com/evmos/evmos and github.com/evmos/evmos/v10.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/evmos/evmos/v13` | Go | All versions | None |
| `github.com/evmos/evmos/v13` | Go | All versions to 13.0.2 | None |
| `github.com/evmos/evmos/v13` | Go | All versions to 13.0.2 | None |
| `github.com/evmos/evmos` | Go | All versions | None |
| `github.com/evmos/evmos/v10` | Go | All versions | None |
| `github.com/evmos/evmos/v11` | Go | All versions | None |
| `github.com/evmos/evmos/v12` | Go | All versions | None |
| `github.com/evmos/evmos/v13/x/vesting` | Go | All versions to 13.0.2 | None |
| `github.com/evmos/evmos/v13/x/vesting` | Go | All versions to 13.0.2 | None |
| `github.com/evmos/evmos/v2` | Go | All versions | None |
| `github.com/evmos/evmos/v3` | Go | All versions | None |
| `github.com/evmos/evmos/v4` | Go | All versions | None |
| `github.com/evmos/evmos/v5` | Go | All versions | None |
| `github.com/evmos/evmos/v6` | Go | All versions | None |
| `github.com/evmos/evmos/v7` | Go | All versions | None |
| `github.com/evmos/evmos/v8` | Go | All versions | None |
| `github.com/evmos/evmos/v9` | Go | All versions | None |

## How do I fix GHSA-m99c-q26r-m7m7?

No fix has been published for GHSA-m99c-q26r-m7m7 yet. Limit exposure of the affected software until one is available.

## Is GHSA-m99c-q26r-m7m7 being exploited?

There is no known exploitation of GHSA-m99c-q26r-m7m7 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-m99c-q26r-m7m7 and fix it if it is affected.

What it is: GHSA-m99c-q26r-m7m7 is a vulnerability in github.com/evmos/evmos, published on 17 Apr 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of GHSA-m99c-q26r-m7m7 in the wild and no public exploit code.

Affected packages and fixed versions:
- github.com/evmos/evmos/v13 (Go): affected all versions; no fix listed
- github.com/evmos/evmos/v13 (Go): affected all versions up to 13.0.2; no fix listed
- github.com/evmos/evmos/v13 (Go): affected all versions up to 13.0.2; no fix listed
- github.com/evmos/evmos (Go): affected all versions; no fix listed
- github.com/evmos/evmos/v10 (Go): affected all versions; no fix listed
- github.com/evmos/evmos/v11 (Go): affected all versions; no fix listed
- github.com/evmos/evmos/v12 (Go): affected all versions; no fix listed
- github.com/evmos/evmos/v13/x/vesting (Go): affected all versions up to 13.0.2; no fix listed
- github.com/evmos/evmos/v13/x/vesting (Go): affected all versions up to 13.0.2; no fix listed
- github.com/evmos/evmos/v2 (Go): affected all versions; no fix listed
- github.com/evmos/evmos/v3 (Go): affected all versions; no fix listed
- github.com/evmos/evmos/v4 (Go): affected all versions; no fix listed

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/GHSA-m99c-q26r-m7m7/ (Markdown: https://insights.sbomify.com/GHSA-m99c-q26r-m7m7/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-m99c-q26r-m7m7

---
From sbomify Insights: https://insights.sbomify.com/GHSA-m99c-q26r-m7m7/
Summaries are generated and may contain mistakes; the official description above is the record.
