{"id":"CVE-2026-40881","aliases":["CVE-2026-40881","GHSA-xr93-pcq3-pxf8"],"related":[],"kind":"vulnerability","state":"published","title":"Zebra: addr/addrv2 Deserialization Resource Exhaustion","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"# CVE-2026-40881: addr/addrv2 Deserialization Resource Exhaustion\n\n## Summary\n\nWhen 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.\n\n## Severity\n\n**Moderate** - This is a Denial of Service Vulnerability that could allow an attacker to crash a Zebra node.\n\n## Affected Versions\n\nAll Zebra versions prior to **version 4.3.1**.\n\n## Description\n\nThe 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.\n\nAn attacker could exploit this by:\n1. Creating `addr` or `addrv2` messages with a large number of entries.\n2. Submitting them to a Zebra node, possibly through multiple connections, to attempt to get Zebra into an out-of-memory state.\n\n## Impact\n\n**Denial of Service**\n\n* **Attack Vector:** Network.\n* **Effect:** Zebra node crash.\n* **Scope:** Any impacted Zebra node.\n\n## Fixed Versions\n\nThis issue is fixed in **Zebra 4.3.1**. \n\nThe fix changes the `max_allocation()` method for the relevant types to return 1,000, thus blocking larger values prior to deserialization.\n\n## Mitigation\n\nUsers should upgrade to **Zebra 4.3.1** or later immediately. \n\nThere 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.\n\n## Credits\n\nThanks @Zk-nd3r for finding and reporting the issue, and suggesting the fix.","format":"markdown","source":"ghsa"},{"lang":"es","text":"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.","source":"nvd"}],"published":"2026-04-18T00:42:05.000Z","modified":"2026-10-26T21:10:00.170Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"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","score":6.3,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"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","score":6.3,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"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","rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"}],"cwes":["CWE-770"],"affected":[{"ranges":[{"version":"< 4.3.1","status":"affected"}],"vendor":"ZcashFoundation","product":"zebrad","source":"cvelist"},{"ranges":[{"version":"< 5.0.1","status":"affected"}],"vendor":"ZcashFoundation","product":"zebra-network","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"4.3.1"}],"ecosystem":"crates.io","package":"zebrad","purl":"pkg:cargo/zebrad","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"5.0.1"}],"ecosystem":"crates.io","package":"zebra-network","purl":"pkg:cargo/zebra-network","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"5.0.1"}],"vendor":"zfnd","product":"zebra-network","cpe":"cpe:2.3:a:zfnd:zebra-network:*:*:*:*:*:rust:*:*","source":"nvd"},{"ranges":[{"status":"affected","fixed":"4.3.1"}],"vendor":"zfnd","product":"zebrad","cpe":"cpe:2.3:a:zfnd:zebrad:*:*:*:*:*:rust:*:*","source":"nvd"}],"references":[{"url":"https://github.com/ZcashFoundation/zebra/security/advisories/GHSA-xr93-pcq3-pxf8","tags":["exploit","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-40881","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/ZcashFoundation/zebra","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"partial","date":"2026-04-21T19:51:52.666Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-40881","url":"https://www.cve.org/CVERecord?id=CVE-2026-40881","licence":"CVE Terms of Use","modified":"2026-04-21T20:36:18.824Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-xr93-pcq3-pxf8","url":"https://github.com/advisories/GHSA-xr93-pcq3-pxf8","licence":"CC-BY-4.0","modified":"2026-05-05T16:12:23.539Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-40881","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-40881","licence":"Public domain","modified":"2026-10-26T21:10:00.170Z"}],"updatedAt":"2026-11-25T22:59:19.139Z","epss":{"score":0.00273,"percentile":0.21059,"date":"2026-12-01T12:00:22.000Z"}}