{"answers":{"affected":"4 open source packages ship an affected version, including zebra-network and zebrad.","exploited":"There is no known exploitation of GHSA-h72h-ppcx-998p in the wild and no public exploit code.","fix":"Upgrade zebra-network to 7.0.0 or later.","what":"GHSA-h72h-ppcx-998p is a denial of service vulnerability in zebra-network, published on 2 Jul 2026. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for GHSA-h72h-ppcx-998p and fix it if it is affected.\n\nWhat it is: GHSA-h72h-ppcx-998p is a denial of service vulnerability in zebra-network, published on 2 Jul 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: There is no known exploitation of GHSA-h72h-ppcx-998p in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- zebra-network (crates.io): affected all versions; fixed in 7.0.0\n- zebra-network (crates.io): affected all versions; fixed in 7.0.0\n- zebrad (crates.io): affected all versions; fixed in 4.5.0\n- zebrad (crates.io): affected all versions; fixed in 4.5.0\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/GHSA-h72h-ppcx-998p/ (Markdown: https://insights.sbomify.com/GHSA-h72h-ppcx-998p/index.md)","id":"GHSA-h72h-ppcx-998p","markdown":"https://insights.sbomify.com/GHSA-h72h-ppcx-998p/index.md","name":"GHSA-h72h-ppcx-998p","record":{"aliases":[],"analysis":{"component_type":"server_software","fix_type":"patch","impacts":["denial_of_service"],"network_reachable":"yes","non_default_config":false,"product_category":"Zcash node software","requires_auth":"none","summary":"Remote attackers can cause resource exhaustion in Zebra nodes by reserving large buffers before handshake, potentially leading to denial of service.","user_interaction":"not_required","vuln_class":"denial_of_service"},"analysis_generated_by":"qwen3.8-flash-next","assigner":null,"cpe":[],"cvss":{"score":null,"severity":null,"source":null,"vector":null,"version":null},"cwes":[],"description":"### Am I affected\n\nYou are affected if:\n\n1. You run `zebrad` up to and including `v4.4.1`.\n2. Your node accepts inbound P2P connections (`network.listen_addr` is set, which is the default).\n\n### Summary\n\nThe P2P codec's `Codec::decode()` method calls `src.reserve(body_len + HEADER_LEN)` after parsing a 24-byte protocol header, using the attacker-claimed `body_len` field. This reserves up to `MAX_PROTOCOL_MESSAGE_LEN` (~2 MiB) of virtual buffer capacity per connection before any body bytes arrive and before the handshake completes.\n\nHowever, `BytesMut::reserve()` sets virtual capacity without committing physical memory pages. The operating system does not allocate physical RAM until bytes are actually written into the buffer. Since the attacker never sends body bytes, the reserved capacity remains uncommitted. Reproduction of the reporter's PoC (256 threads, 30 seconds of sustained connections) showed negligible RSS impact on the Zebra process.\n\nZebra's existing mitigations further constrain the practical attack surface: per-IP connection limits (`max_connections_per_ip = 1`), a per-connection accept rate of approximately one per second, and a 3-second handshake timeout that cleans up idle connections.\n\n### Details\n\nAt `zebra-network/src/protocol/external/codec.rs:406`, after parsing the 24-byte header and validating the network magic and body length against `MAX_PROTOCOL_MESSAGE_LEN`, the codec calls `src.reserve(body_len + HEADER_LEN)`. The codec is constructed on the bare TCP stream before `negotiate_version()` runs, so the reservation is reachable from any TCP peer that can send 24 bytes.\n\nNo legitimate Zcash handshake message (`version`, `verack`) is anywhere close to 2 MiB. The codec makes no distinction between pre-handshake and post-handshake message types when sizing the reservation.\n\n### Patches\n\nThe fix defers large buffer reservations until after the handshake completes, or caps the per-message reservation for pre-handshake messages to what `version`/`verack` actually require.\n\n### Workarounds\n\nNo workaround is needed. The existing per-IP rate limiting, handshake timeout, and connection limits effectively mitigate the practical impact.\n\n### Impact\n\nMinimal. The reservation affects virtual address space only, not physical memory. Zebra's existing connection-management mitigations (per-IP limits, accept rate, handshake timeout) further constrain the attack. The code path is worth cleaning up for defense-in-depth but does not produce a measurable denial-of-service effect.\n\n### Credit\n\nReported by `@ouicate` via a private GitHub Security Advisory submission.","ecosystems":["crates.io"],"exploits":{"exploitdb":null,"first_seen":null,"github_poc":null,"max_poc_stars":null,"metasploit":null,"nuclei":null,"refs":[],"tier":null},"has_fix":true,"headline":"Zebra has pre-handshake buffer capacity reservation based on attacker-claimed body length","id":"GHSA-h72h-ppcx-998p","indexable":true,"kev":null,"kind":"advisory","links":{"ecosystem":"crates.io","product":null,"products":[],"type":"denial_of_service","year":"2026"},"n_packages":4,"n_references":null,"packages":[{"ecosystem":"crates.io","fixed":["7.0.0"],"introduced":["0"],"last_affected":[],"package":"zebra-network","purl":null,"source":"GHSA-h72h-ppcx-998p"},{"ecosystem":"crates.io","fixed":["7.0.0"],"introduced":["0"],"last_affected":[],"package":"zebra-network","purl":"pkg:cargo/zebra-network","source":"GHSA-h72h-ppcx-998p"},{"ecosystem":"crates.io","fixed":["4.5.0"],"introduced":["0"],"last_affected":[],"package":"zebrad","purl":null,"source":"GHSA-h72h-ppcx-998p"},{"ecosystem":"crates.io","fixed":["4.5.0"],"introduced":["0"],"last_affected":[],"package":"zebrad","purl":"pkg:cargo/zebrad","source":"GHSA-h72h-ppcx-998p"}],"products":null,"published":"2026-07-02","related":[],"sources":[{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":null,"updated":null,"vendors":null},"summary":"Remote attackers can cause resource exhaustion in Zebra nodes by reserving large buffers before handshake, potentially leading to denial of service.","url":"https://insights.sbomify.com/GHSA-h72h-ppcx-998p/"}