# GHSA-m3rh-cvr5-x6q4: CosmWasm wasmd has large address count in ValidateBasic

> An attacker can cause resource exhaustion and denial of service by submitting messages with excessive address counts to wasmd nodes.

- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 8 Aug 2024
- **Also known as:** GO-2024-3059

## What is GHSA-m3rh-cvr5-x6q4?

GHSA-m3rh-cvr5-x6q4 is a denial of service vulnerability in github.com/CosmWasm/wasmd, published on 8 Aug 2024. Any signed-in user can exploit it over the network, with no action from the victim.

### Official description

**Component:** wasmd
**Criticality:** Low ([ACMv1](https://github.com/interchainio/security/blob/main/resources/CLASSIFICATION_MATRIX.md): I:Moderate; L:Unlikely)
**Patched versions:** wasmd 0.52.0

In multiple wasmd message types it was possible to add a large number of addresses which might lead to unexpected resource consumption in ValidateBasic.

See [CWA-2024-003](https://github.com/CosmWasm/advisories/blob/main/CWAs/CWA-2024-003.md) for more details.

## Which versions are affected by GHSA-m3rh-cvr5-x6q4?

3 open source packages ship an affected version, including github.com/CosmWasm/wasmd.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/CosmWasm/wasmd` | Go | All versions | 0.52.0 |
| `github.com/CosmWasm/wasmd` | Go | All versions | 0.52.0 |
| `github.com/CosmWasm/wasmd` | Go | All versions | 0.52.0 |

## How do I fix GHSA-m3rh-cvr5-x6q4?

Upgrade github.com/CosmWasm/wasmd to 0.52.0 or later.

## Is GHSA-m3rh-cvr5-x6q4 being exploited?

There is no known exploitation of GHSA-m3rh-cvr5-x6q4 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-m3rh-cvr5-x6q4 and fix it if it is affected.

What it is: GHSA-m3rh-cvr5-x6q4 is a denial of service vulnerability in github.com/CosmWasm/wasmd, published on 8 Aug 2024. Any signed-in user can exploit it over the network, with no action from the victim.
Exploitation: There is no known exploitation of GHSA-m3rh-cvr5-x6q4 in the wild and no public exploit code.

Affected packages and fixed versions:
- github.com/CosmWasm/wasmd (Go): affected all versions; fixed in 0.52.0
- github.com/CosmWasm/wasmd (Go): affected all versions; fixed in 0.52.0
- github.com/CosmWasm/wasmd (Go): affected all versions; fixed in 0.52.0

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-m3rh-cvr5-x6q4/ (Markdown: https://insights.sbomify.com/GHSA-m3rh-cvr5-x6q4/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-m3rh-cvr5-x6q4

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