6.3medium
Zebra: addr/addrv2 Deserialization Resource Exhaustion
- Severity
- 6.3medium CVSS:4.0 by GitHub_M
- Exploit likelihood
- 0.27% (higher than 21% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-xr93-pcq3-pxf8
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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| ZcashFoundation zebrad | < 4.3.1 | CVE List |
| ZcashFoundation zebra-network | < 5.0.1 | CVE List |
| zebrad (crates.io) | before 4.3.1 | GitHub Advisory Database |
| zebra-network (crates.io) | before 5.0.1 | GitHub Advisory Database |
| zfnd zebra-network | before 5.0.1 | NVD |
| zfnd zebrad | before 4.3.1 | NVD |
All scores
| GitHub_M | 6.3medium CVSS:4.0 | 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 |
| GitHub | medium CVSS:4.0 | 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 |
| NVD | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
Classification
SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial.
What each source says
CVE List
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.
GitHub Advisory Database
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.
NVD (es)
ZEBRA es un nodo Zcash escrito completamente en Rust. Antes de la versión 4.3.0 de zebrad y la versión 5.0.1 de zebra-network, al deserializar mensajes addr o addrv2, que contienen vectores de direcciones, Zebra los deserializaría completamente hasta una longitud máxima (más de 233.000) que se derivaba del límite de tamaño de mensaje de 2 MiB. Esto es mucho mayor que el límite real de 1.000 mensajes de la especificación. Zebra eventualmente verificaría ese límite pero, en ese momento, la memoria para el vector más grande ya estaba asignada. Un atacante podría causar abortos por falta de memoria en Zebra al enviar múltiples mensajes de este tipo a través de diferentes conexiones. Esta vulnerabilidad está corregida en la versión 4.3.0 de zebrad y la versión 5.0.1 de zebra-network.
References
| https://github.com/ZcashFoundation/zebra/security/advisories/GHSA-xr93-pcq3-pxf8 | exploit, vendor-advisory, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2026-40881 | advisory | |
| https://github.com/ZcashFoundation/zebra | package | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-40881 changed 2026-04-21 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-xr93-pcq3-pxf8 changed 2026-05-05 | CC-BY-4.0 |
| NVD | CVE-2026-40881 changed 2026-10-26 | Public domain |