CVE-2026-40881: Zebra: addr/addrv2 Deserialization Resource Exhaustion
CVE-2026-40881: addr/addrv2 Deserialization Resource Exhaustion Summary 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.
Published Apr 18, 2026 · Updated May 21, 2026
Affected packages
zebrad
- Ecosystem
- Rust (crates.io)
- Affected
- < 4.3.1
- Fixed in
- 4.3.1
- Check
cargo tree -i zebrad
zebra-network
- Ecosystem
- Rust (crates.io)
- Affected
- < 5.0.1
- Fixed in
- 5.0.1
- Check
cargo tree -i zebra-network
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
CVE-2026-40881: addr/addrv2 Deserialization Resource Exhaustion
Summary
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.
Severity
Moderate - This is a Denial of Service Vulnerability that could allow an attacker to crash a Zebra node.
Affected Versions
All Zebra versions prior to version 4.3.1.
Description
The vulnerability exists in the read_addr/addrv2 functions in codec.rs. It deserializes a vector of addresses with the zcash_deserialize() trait method, which uses as a upper bound the result of T::max_allocation(). For theses types, it was derived from dividing the max message size (2 MiB) by the minimum serialized size of one entry. For AddrV1: 2_097_152 / 30 = 69,904. For AddrV2: 2_097_152 / 9 = 233,016. Only after deserialization was the MAX_ADDRS_IN_MESSAGE = 1000 limit checked.
An attacker could exploit this by:
- Creating
addroraddrv2messages with a large number of entries. - Submitting them to a Zebra node, possibly through multiple connections, to attempt to get Zebra into an out-of-memory state.
Impact
Denial of Service
- Attack Vector: Network.
- Effect: Zebra node crash.
- Scope: Any impacted Zebra node.
Fixed Versions
This issue is fixed in Zebra 4.3.1.
The fix changes the max_allocation() method for the relevant types to return 1,000, thus blocking larger values prior to deserialization.
Mitigation
Users should upgrade to Zebra 4.3.1 or later immediately.
There are no known workarounds for this issue. Immediate upgrade is the only way to ensure the node remains not vulnerable to the denial of service attack.
Credits
Thanks @Zk-nd3r for finding and reporting the issue, and suggesting the fix.
Credited to Zk-nd3r, oxarbitrage, conradoplg, mpguerra.
References
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More Rust (crates.io) vulnerabilities
All Rust (crates.io) entriesCVE-2026-54496
Zebra: Missing copy constraint in halo2_gadgets variable-base scalar multiplication allows under-constrained base, breaking Orchard Action circuit soundness
critical9.3Jul 6, 2026CVE-2026-52731
zebrad has full node denial of service via non-ASCII LongPollId in getblocktemplate
medium6.5Jul 2, 2026CVE-2026-52732
zebrad has mempool transaction admission denial via single-peer inbound queue saturation
medium5.3Jul 2, 2026CVE-2026-52733
zebrad has persistent on-disk corruption of Sapling/Orchard subtree roots after chain fork via pop_tip
medium6.5Jul 2, 2026CVE-2026-52734
zebrad has unbounded memory leak in mempool download pipeline via timeout path cancel_handles retention
medium5.3Jul 2, 2026CVE-2026-52735
zebrad has consensus divergence via P2SH sigop undercount in pure-Rust disabled-opcode parser
critical9.3Jul 2, 2026
