# GHSA-p22h-3m2v-cmgh: Cosmos SDK's Integer Overflow vulnerability in its Validator Rewards pool can cause a chain halt

> A malicious validator can trigger an integer overflow in the Cosmos SDK distribution module, causing a complete blockchain halt.

- **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 Jul 2025
- **Also known as:** GO-2025-3803

## What is GHSA-p22h-3m2v-cmgh?

GHSA-p22h-3m2v-cmgh is a vulnerability in github.com/cosmos/cosmos-sdk, published on 8 Jul 2025. Any signed-in user can exploit it over the network, with no action from the victim.

### Official description

Description
Name: ISA-2025-005: Integer Overflow in Cosmos SDK
Component: CosmosSDK
Criticality: High (Considerable Impact; Likely Likelihood per [ACMv1.2](https://github.com/interchainio/security/blob/main/resources/CLASSIFICATION_MATRIX.md))
Affected versions: <= v0.50.13, <= 0.53.2
Affected users: Validators, Full nodes, Users on chains that utilize the distribution module
Cosmos SDK chains in unpatched releases that use the x/distribution module are affected.

Description
An issue was discovered in the distribution module where a malicious deposit into the Validator Rewards pool would result in an integer overflow that would cause a chain halt. A malicious validator can interact with the distribution module to introduce this state.

Patches
Has the problem been patched? What versions should users upgrade to?

The new Cosmos SDK release [v0.50.14](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.50.14) and [v0.53.3](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.53.3) fix this issue.

There are no known workarounds for this issue. It is advised that chains apply the update.

This issue was reported to the Cosmos Bug Bounty Program by `myte1111111` on HackerOne on April 15, 2025. If you believe you have found a bug in the Interchain Stack or would like to contribute to the program by reporting a bug, please see https://hackerone.com/cosmos.

If you have questions about Interchain security efforts, please reach out to our official communication channel at [security@interchain.io](mailto:security@interchain.io). For more information about the Interchain Foundation’s engagement with Amulet, and to sign up for security notification emails, please see https://github.com/interchainio/security.

## Which versions are affected by GHSA-p22h-3m2v-cmgh?

5 open source packages ship an affected version, including github.com/cosmos/cosmos-sdk.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/cosmos/cosmos-sdk` | Go | All versions | 0.50.14, 0.53.3 |
| `github.com/cosmos/cosmos-sdk` | Go | All versions | 0.50.14 |
| `github.com/cosmos/cosmos-sdk` | Go | All versions | 0.50.14 |
| `github.com/cosmos/cosmos-sdk` | Go | From 0.52.0-alpha.1 | 0.53.3 |
| `github.com/cosmos/cosmos-sdk` | Go | From 0.52.0-alpha.1 | 0.53.3 |

## How do I fix GHSA-p22h-3m2v-cmgh?

Upgrade github.com/cosmos/cosmos-sdk to a fixed version for your release line: 0.50.14 or 0.53.3.

## Is GHSA-p22h-3m2v-cmgh being exploited?

There is no known exploitation of GHSA-p22h-3m2v-cmgh in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-p22h-3m2v-cmgh and fix it if it is affected.

What it is: GHSA-p22h-3m2v-cmgh is a vulnerability in github.com/cosmos/cosmos-sdk, published on 8 Jul 2025. Any signed-in user can exploit it over the network, with no action from the victim.
Exploitation: There is no known exploitation of GHSA-p22h-3m2v-cmgh in the wild and no public exploit code.

Affected packages and fixed versions:
- github.com/cosmos/cosmos-sdk (Go): affected all versions; fixed in 0.50.14, 0.53.3
- github.com/cosmos/cosmos-sdk (Go): affected all versions; fixed in 0.50.14
- github.com/cosmos/cosmos-sdk (Go): affected all versions; fixed in 0.50.14
- github.com/cosmos/cosmos-sdk (Go): affected from 0.52.0-alpha.1; fixed in 0.53.3
- github.com/cosmos/cosmos-sdk (Go): affected from 0.52.0-alpha.1; fixed in 0.53.3

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-p22h-3m2v-cmgh/ (Markdown: https://insights.sbomify.com/GHSA-p22h-3m2v-cmgh/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-p22h-3m2v-cmgh

---
From sbomify Insights: https://insights.sbomify.com/GHSA-p22h-3m2v-cmgh/
Summaries are generated and may contain mistakes; the official description above is the record.
