Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
🦀 crates.io

GHSA-xr93-pcq3-pxf8

GHSA-xr93-pcq3-pxf8 is a CWE-770 vulnerability in zebrad. O3 Security confirms whether GHSA-xr93-pcq3-pxf8 is actually reachable in your code before you act, and blocks exploitation at runtime until you patch.

Zebra: addr/addrv2 Deserialization Resource Exhaustion

Also known asCVE-2026-40881
Published
Apr 18, 2026
Updated
May 5, 2026
Affected
2 pkgs
Patched
2 / 2
Exploits
None indexed

Real-World Exposure

2 pkgs affected
🦀zebrad🦀zebra-network

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects crates.io packages — download data is not available via public APIs for these ecosystems.

Description

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:

  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 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.

Affected Packages

2 total 2 fixed
EcosystemPackageVulnerable rangeFix
🦀crates.iozebradall versions4.3.1
🦀crates.iozebra-networkall versions5.0.1

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for zebrad. O3's reachability analysis confirms whether the vulnerable code path is actually invoked in your application, so you act on real exposure instead of every transitive match.

  2. Fix

    Update zebrad to 4.3.1 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-xr93-pcq3-pxf8 is resolved across your whole dependency graph.

  3. Workarounds

    If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.

  4. How O3 protects you

    O3 pinpoints whether GHSA-xr93-pcq3-pxf8 is reachable in your code and exactly where to fix it, then blocks exploitation in production at runtime until the patched version is deployed.

Tailored to GHSA-xr93-pcq3-pxf8. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.

Frequently Asked Questions

# 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 connectio
O3 Security · Impact-Aware SCA

Is GHSA-xr93-pcq3-pxf8 in your dependencies?

O3 detects GHSA-xr93-pcq3-pxf8 across crates.io dependencies and uses function-level reachability to confirm whether the vulnerable code path is actually reachable — not just present. No false positives.