CVE-2026-52731
JSON

6.5medium

ZEBRA: Full node denial of service via non-ASCII LongPollId in getblocktemplate

Severity
6.5medium CVSS:3.1 by GitHub_M
Exploit likelihood
0.38% (higher than 33% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-qv2r-v3mx-f4pf

Description

ZEBRA is a Zcash node written entirely in Rust. Prior to 4.5.0, an attacker authenticated to an enabled Zebra RPC endpoint can terminate zebrad by supplying a getblocktemplate LongPollId containing multi-byte UTF-8 characters. In zebra-rpc/src/methods/types/long_poll.rs, LongPollId::from_str originally checked the input byte length and then sliced fixed byte ranges to parse encoded fields. A slice boundary can land inside a multi-byte character and trigger Rust's byte index is not a char boundary panic. Zebra release builds use panic equals abort, so one malformed authenticated RPC request terminates the entire node process and can be repeated after restart. This issue is fixed in version 4.5.0.

Affected

Product or packageVersionsReported by
ZcashFoundation zebra< 4.5.0CVE List
ZcashFoundation zebra-rpc< 8.0.0CVE List
zebra-rpc (crates.io)before 8.0.0GitHub Advisory Database
zebrad (crates.io)before 4.5.0GitHub Advisory Database

All scores

GitHub_M6.5medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
GitHub6.5medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

Classification

CWE-248

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

ZEBRA is a Zcash node written entirely in Rust. Prior to 4.5.0, an attacker authenticated to an enabled Zebra RPC endpoint can terminate zebrad by supplying a getblocktemplate LongPollId containing multi-byte UTF-8 characters. In zebra-rpc/src/methods/types/long_poll.rs, LongPollId::from_str originally checked the input byte length and then sliced fixed byte ranges to parse encoded fields. A slice boundary can land inside a multi-byte character and trigger Rust's byte index is not a char boundary panic. Zebra release builds use panic equals abort, so one malformed authenticated RPC request terminates the entire node process and can be repeated after restart. This issue is fixed in version 4.5.0.

GitHub Advisory Database
Am I affected

You are affected if:

  1. You run zebrad up to and including v4.4.1.
  2. Your zebrad.toml sets rpc.listen_addr to a TCP address (RPC server is enabled).
  3. An attacker can authenticate to the RPC endpoint. With the default enable_cookie_auth = true, this requires the attacker to read the .cookie file. With enable_cookie_auth = false, any network client reaching the RPC port can trigger it.
Summary

The getblocktemplate RPC handler panics when parsing a LongPollId parameter that contains non-ASCII (multi-byte UTF-8) characters. The handler performs byte-index string slicing on the user-supplied string, which panics in Rust when a byte index falls within a multi-byte character boundary. Because Zebra's release profile sets panic = "abort", the panic terminates the entire node process.

Details

The getblocktemplate handler receives a user-supplied LongPollId string and slices it at fixed byte offsets to extract the encoded tip hash and tip height. When the string contains multi-byte UTF-8 characters, a byte-index slice can land in the middle of a character, causing Rust's str indexing to panic with "byte index is not a char boundary."

Under the panic = "abort" release profile, this panic terminates the entire zebrad process rather than just the RPC task.

Patches

zebra-rpc 8.0.0 and zebrad 4.5.0.

Replace byte-index string slicing with character-aware parsing or validate that the LongPollId string contains only ASCII characters before slicing.

Workarounds
  • Disable the RPC server by removing rpc.listen_addr from zebrad.toml.
  • Ensure enable_cookie_auth = true (the default) and restrict filesystem access to the .cookie file.
  • Place a reverse proxy in front of the RPC port that validates LongPollId parameters are ASCII-only before forwarding.
Impact

A single authenticated RPC request terminates the zebrad process. Same impact profile as GHSA-c8w6-x74f-vmg3: repeatable on restart, affects mining pools and infrastructure that forward getblocktemplate calls.

Credit

Reported by @sangsoo-osec via a private GitHub Security Advisory submission.

NVD (es)

ZEBRA es un nodo Zcash escrito completamente en Rust. Antes de la versión 4.5.0, un atacante autenticado en un endpoint RPC de Zebra habilitado puede terminar zebrad al proporcionar un LongPollId de getblocktemplate que contiene caracteres UTF-8 multibyte. En zebra-rpc/src/methods/types/long_poll.rs, LongPollId::from_str originalmente verificaba la longitud de los bytes de entrada y luego segmentaba rangos de bytes fijos para analizar campos codificados. Un límite de segmento puede caer dentro de un carácter multibyte y desencadenar el pánico de Rust ’byte index is not a char boundary’. Las compilaciones de lanzamiento de Zebra usan ’panic equals abort’, por lo que una solicitud RPC autenticada malformada termina todo el proceso del nodo y puede repetirse después del reinicio. Este problema está solucionado en la versión 4.5.0.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-52731 changed 2026-08-18CVE Terms of Use
GitHub Advisory DatabaseGHSA-qv2r-v3mx-f4pf changed 2026-07-02CC-BY-4.0
NVDCVE-2026-52731 changed 2026-11-09Public domain