# CVE-2026-40880: Zebra: Cached Mempool Verification Bypasses Consensus Rules for Ahead-of-Tip Blocks

> A malicious miner can cause a consensus split in Zebra nodes by exploiting a verification cache logic error, leading to network partitioning.

- **Severity:** High 7.2 (`CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:N/VI:H/VA:H/SC:N/SI:H/SA:H`)
- **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:** 21 Apr 2026
- **Updated:** 21 Apr 2026
- **Also known as:** GHSA-xvj8-ph7x-65gf

## What is CVE-2026-40880?

CVE-2026-40880 is a high-severity vulnerability in ZcashFoundation zebra-consensus, published on 21 Apr 2026. Any signed-in user can exploit it over the network, with no action from the victim.

### Official description

ZEBRA is a Zcash node written entirely in Rust. Prior to zebrad version 4.3.1 and zebra-consensus version 5.0.2, a logic error in Zebra's transaction verification cache could allow a malicious miner to induce a consensus split. By carefully submitting a transaction that is valid for height H+1 but invalid for H+2 and then mining that transaction in a block at height H+2, a miner could cause vulnerable Zebra nodes to accept an invalid block, leading to a consensus split from the rest of the Zcash network. This vulnerability is fixed in zebrad version 4.3.1 and zebra-consensus version 5.0.2.

Weakness: CWE-1025 (Comparison Using Wrong Factors)

## Which versions are affected by CVE-2026-40880?

4 open source packages ship an affected version, including zebra-consensus and zebrad. It affects 2 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `zebra-consensus` | crates.io | All versions | 5.0.2 |
| `zebra-consensus` | crates.io | All versions | 5.0.2 |
| `zebrad` | crates.io | All versions | 4.3.1 |
| `zebrad` | crates.io | All versions | 4.3.1 |

Products: Zfnd Zebra-Consensus, Zfnd Zebrad.

## How do I fix CVE-2026-40880?

Upgrade zebra-consensus to 5.0.2 or later.

## Is CVE-2026-40880 being exploited?

There is no known exploitation of CVE-2026-40880 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-40880 and fix it if it is affected.

What it is: CVE-2026-40880 is a high-severity vulnerability in ZcashFoundation zebra-consensus, published on 21 Apr 2026. Any signed-in user can exploit it over the network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2026-40880 in the wild and no public exploit code.

Affected packages and fixed versions:
- zebra-consensus (crates.io): affected all versions; fixed in 5.0.2
- zebra-consensus (crates.io): affected all versions; fixed in 5.0.2
- zebrad (crates.io): affected all versions; fixed in 4.3.1
- zebrad (crates.io): affected all versions; fixed in 4.3.1

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/CVE-2026-40880/ (Markdown: https://insights.sbomify.com/CVE-2026-40880/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-40880
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-40880
- OSV: https://osv.dev/vulnerability/CVE-2026-40880

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-40880/
Summaries are generated and may contain mistakes; the official description above is the record.
