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

Published Apr 18, 2026
·
Updated

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 readaddr/addrv2 functions in codec.rs. It deserializes a vector of addresses with the zcashdeserialize() trait method, which uses as a upper bound the result of T::maxallocation(). For theses types, it was derived from dividing the max message size (2 MiB) by the minimum serialized size of one entry. For AddrV1: 2097152 / 30 = 69,904. For AddrV2: 2097152 / 9 = 233,016. Only after deserialization was the MAXADDRSINMESSAGE = 1000 limit checked.

An attacker could exploit this by: 1. Creating addr or addrv2 messages with a large number of entries. 2. 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 maxallocation() 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.

Other sources

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.

— MITRE

Affected Software

4 affected componentsFixes available
rust/zebra-network<5.0.1
5.0.1
rust/zebrad<4.3.1
4.3.1
zfnd Zebra-network Rust<5.0.1
zfnd Zebrad Rust<4.3.1

Event History

Apr 18, 2026
Advisory Published
via GitHub·12:42 AM
Data Sourced
via GitHub·12:42 AM
DescriptionWeaknessAffected Software
Apr 21, 2026
CVE Published
via MITRE·07:20 PM
Data Sourced
via MITRE·07:20 PM
DescriptionWeakness
Data Sourced
via NVD·08:17 PM
DescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2026-40881?

CVE-2026-40881 is classified as a resource exhaustion vulnerability, which can lead to denial-of-service conditions.

2

How do I fix CVE-2026-40881?

To mitigate CVE-2026-40881, upgrade to zebra-network version 5.0.1 or zebrad version 4.3.1 or later.

3

What systems are affected by CVE-2026-40881?

CVE-2026-40881 affects systems using zebra-network versions prior to 5.0.1 and zebrad versions prior to 4.3.1.

4

What type of attack does CVE-2026-40881 enable?

CVE-2026-40881 enables attackers to exploit resource exhaustion issues through excessive address vector deserialization.

5

Is CVE-2026-40881 easily exploitable?

CVE-2026-40881 may be exploited through targeted attacks involving large deserialization inputs.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203