# CVE-2026-40881: Zebra: addr/addrv2 Deserialization Resource Exhaustion

> Attackers can cause out-of-memory aborts in Zebra Zcash nodes by sending oversized address messages, requiring an upgrade to fix.

- **Severity:** Medium 6.3 (`CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:L`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 21 Apr 2026
- **Updated:** 21 Apr 2026
- **Also known as:** GHSA-xr93-pcq3-pxf8

## What is CVE-2026-40881?

CVE-2026-40881 is a medium-severity denial of service vulnerability in ZcashFoundation zebra-network, published on 21 Apr 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

ZEBRA is a Zcash node written entirely in Rust. Prior to zebrad version 4.3.0 and zebra-network version 5.0.1, when deserializing addr or addrv2 messages, which contain vectors of addresses, Zebra would fully deserialize them up to a maximum length (over 233,000) that was derived from the 2 MiB message size limit. This is much larger than the actual limit of 1,000 messages from the specification. Zebra would eventually check that limit but, at that point, the memory for the larger vector was already allocated. An attacker could cause out-of-memory aborts in Zebra by sending multiple such messages over different connections. This vulnerability is fixed in zebrad version 4.3.0 and zebra-network version 5.0.1.

Weakness: CWE-770 (Allocation of Resources Without Limits or Throttling)

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

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


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

Products: Zfnd Zebra-Network, Zfnd Zebrad.

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

Upgrade zebra-network to 5.0.1 or later.

## Is CVE-2026-40881 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-40881 exists.

## Fix prompt for AI coding agents

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

What it is: CVE-2026-40881 is a medium-severity denial of service vulnerability in ZcashFoundation zebra-network, published on 21 Apr 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-40881 exists.

Affected packages and fixed versions:
- zebra-network (crates.io): affected all versions; fixed in 5.0.1
- zebra-network (crates.io): affected all versions; fixed in 5.0.1
- 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-40881/ (Markdown: https://insights.sbomify.com/CVE-2026-40881/index.md)
```

## Sources

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

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