# GHSA-qr8r-m495-7hc4: Validation of `VoteExtensionsEnableHeight` can cause chain halt in Go package github.com/cometbft/cometbft

> A validation flaw in CometBFT allows a governance proposal to trigger a panic, halting the blockchain network for all nodes.

- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Login needed:** An administrator
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 19 Jan 2024
- **Also known as:** GO-2024-2471

## What is GHSA-qr8r-m495-7hc4?

GHSA-qr8r-m495-7hc4 is a denial of service vulnerability in github.com/cometbft/cometbft, published on 19 Jan 2024. An attacker needs administrator access to exploit it, with no action from the victim.

### Official description

## Summary

A vulnerability in CometBFT’s validation logic for `VoteExtensionsEnableHeight` can result in a chain halt when triggered through a governance parameter change proposal on an ABCI2 Application Chain. If a parameter change proposal including a `VoteExtensionsEnableHeight` modification is passed, nodes running the affected versions may panic, halting the network.

The CometBFT team addressed this issue by improving validation logic for the `VoteExtensionsEnableHeight` to correctly handle governance proposals addressing this parameter.

## Next Steps for Impacted Parties

If you are a chain developer with an active network running on CometBFT v. 0.38.x, we recommend updating your chain application to v0.38.3 or later of CometBFT to patch this issue. 

This issue can be resolved with a “soft patch” to an active network, i.e. nodes can be patched and restarted at different times without the need for a coordinated upgrade that halts a chain. If this patching methodology is used, the risk of a network halt triggered by this issue is mitigated once more than 66.7% of voting power on the network has applied the update, which provides protection from exploitation while on-chain governance processes for software upgrades take place. Once all validator nodes operating a network have been updated, the risk of a network halt due to this issue will be fully resolved. 

For more information about CometBFT, see https://docs.cometbft.com/. 

This issue was found by Dongsam ([@b_harvest](https://twitter.com/b__harvest?lang=en)) who reported it to the Cosmos Bug Bounty Program on HackerOne on January 15, 2024. 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.

## Which versions are affected by GHSA-qr8r-m495-7hc4?

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


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/cometbft/cometbft` | Go | From 0.38.0 | 0.38.3 |
| `github.com/cometbft/cometbft` | Go | From 0.38.0 | 0.38.3 |
| `github.com/cometbft/cometbft` | Go | From 0.38.0 | 0.38.3 |

## How do I fix GHSA-qr8r-m495-7hc4?

Upgrade github.com/cometbft/cometbft to 0.38.3 or later.

## Is GHSA-qr8r-m495-7hc4 being exploited?

There is no known exploitation of GHSA-qr8r-m495-7hc4 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-qr8r-m495-7hc4 and fix it if it is affected.

What it is: GHSA-qr8r-m495-7hc4 is a denial of service vulnerability in github.com/cometbft/cometbft, published on 19 Jan 2024. An attacker needs administrator access to exploit it, with no action from the victim.
Exploitation: There is no known exploitation of GHSA-qr8r-m495-7hc4 in the wild and no public exploit code.

Affected packages and fixed versions:
- github.com/cometbft/cometbft (Go): affected from 0.38.0; fixed in 0.38.3
- github.com/cometbft/cometbft (Go): affected from 0.38.0; fixed in 0.38.3
- github.com/cometbft/cometbft (Go): affected from 0.38.0; fixed in 0.38.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-qr8r-m495-7hc4/ (Markdown: https://insights.sbomify.com/GHSA-qr8r-m495-7hc4/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-qr8r-m495-7hc4

---
From sbomify Insights: https://insights.sbomify.com/GHSA-qr8r-m495-7hc4/
Summaries are generated and may contain mistakes; the official description above is the record.
