CVE-2026-52738: Zebra Finalized Address Balance Credit-first Overflow Vulnerability

MODERATE
Advisory Identifier: GHSA-w834-cf6p-9m9w
CWE-248
Published
Advisory Summary

CVE-2026-52738 is a MODERATE finalized address balance credit-first overflow vulnerability (CWE-248: Uncaught Exception) affecting Zebra libraries in the crates.io ecosystem. The issue involves finalized address balance credit-first overflow on consensus-valid blocks. Remediation is available by upgrading affected packages to version 7.0.0, 4.5.0.

CVE-2026-52738 at a Glance

CVE Identifier CVE-2026-52738
GHSA Identifier GHSA-w834-cf6p-9m9w
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-248: Uncaught Exception
Affected Product Zebra
Package Ecosystem crates.io
Published Date
Last Updated

How to Fix CVE-2026-52738

To remediate this vulnerability, upgrade all affected Zebra dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

zebra-state fixed: 7.0.0
Upgrade zebra-state to 7.0.0
zebrad fixed: 4.5.0
Upgrade zebrad to 4.5.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for zebra-state

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-52738, inspect your project dependencies for Zebra:

inspect dependencies for zebra-state

Analyze the terminal output to locate any version of Zebra in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 7.0.0), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-248: Uncaught Exception, where an exception is thrown from a function, but it is not caught. In Zebra, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Am I affected You are affected if: 1. You run `zebrad` up to and including `v4.4.1`. 2. Your node processes blocks on any Zcash network. ### Summary The finalized transparent address balance writer processes all newly-created outputs (credits) before processing spent outputs (debits) within the same block. A consensus-valid block containing a long chain of same-address transparent self-spends can cause the intermediate per-address balance during the credit pass to exceed `MAX_MONEY`, triggering a panic in the finalized state writer. Because the triggering block is consensus-valid (zcashd accepts it), the panic recurs on restart when the node re-encounters the same block. This creates a persistent chain halt that can only be resolved by a software patch. ### Details The finalized state writer at `zebra-state/src/service/finalized_state/zebra_db/transparent.rs` iterates all transaction outputs in a block and credits them to per-address balances before iterating inputs and debiting spent outputs. When a block contains many transparent self-spends to the same address, the intermediate credit-only balance can exceed the `MAX_MONEY` supply cap even though the final net balance (credits minus debits) is valid. The code panics on the intermediate overflow via `.expect()` on the balance addition. Under Zebra's `panic = "abort"` release profile, this terminates the process. On restart, the node re-downloads and re-processes the same consensus-valid block, triggering the same panic. An attacker with approximately 1,100–2,100 ZEC and mining capability can construct a block that permanently halts all Zebra nodes. The attacker recovers their capital (the self-spends return funds to the same address), so the net cost is the mining effort only. ### Patches Patched in Zebra 4.4.2. The fix processes credits and debits together per transaction rather than all credits then all debits, matching zcashd's approach. ### Workarounds No workaround is available. Upgrade to Zebra 4.4.2. ### Impact A single consensus-valid mined block can permanently halt all Zebra nodes on the network. The halt persists across restarts. Recovery requires deploying a patched version. Downstream consumers (light wallets, exchanges, mining infrastructure) lose service for the duration of the halt. ### Credit Reported by `@sangsoo-osec`.

CVE-2026-52738 Affected Zebra Versions

2 component(s)
Fixed Versions:
7.0.04.5.0
Product / Package Ecosystem Affected Versions Fixed Version
zebra-state
crates.io
< 7.0.0
7.0.0
zebrad
crates.io
< 4.5.0
4.5.0

References

Frequently Asked Questions

What is CVE-2026-52738?
CVE-2026-52738 is a security vulnerability in Zebra involving Finalized address balance credit-first overflow on consensus-valid blocks under CWE-248: Uncaught Exception.
Which Zebra versions are affected?
Affected versions include releases prior to 7.0.0, 4.5.0 across affected packages: zebra-state, zebrad.
What version fixes CVE-2026-52738?
Upgrading to 7.0.0, 4.5.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is zebra-state affected?
Yes, zebra-state is affected in releases prior to 7.0.0. Upgrade your dependency to 7.0.0 or later.
Is zebrad affected?
Yes, zebrad is affected in releases prior to 4.5.0. Upgrade your dependency to 4.5.0 or later.
What CWE is associated with CVE-2026-52738?
CVE-2026-52738 is classified under CWE-248: Uncaught Exception (An exception is thrown from a function, but it is not caught.).
How can I check crates.io dependencies for CVE-2026-52738?
Run the dependency tree command: 'inspect dependencies for zebra-state'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-w834-cf6p-9m9w",
  "modified" : "2026-07-02T19:44:54Z",
  "published" : "2026-07-02T19:44:54Z",
  "aliases" : [ "CVE-2026-52738" ],
  "summary" : "Zebra: Finalized address balance credit-first overflow on consensus-valid blocks",
  "details" : "### Am I affected\n\nYou are affected if:\n\n1. You run `zebrad` up to and including `v4.4.1`.\n2. Your node processes blocks on any Zcash network.\n\n### Summary\n\nThe finalized transparent address balance writer processes all newly-created outputs (credits) before processing spent outputs (debits) within the same block. A consensus-valid block containing a long chain of same-address transparent self-spends can cause the intermediate per-address balance during the credit pass to exceed `MAX_MONEY`, triggering a panic in the finalized state writer.\n\nBecause the triggering block is consensus-valid (zcashd accepts it), the panic recurs on restart when the node re-encounters the same block. This creates a persistent chain halt that can only be resolved by a software patch.\n\n### Details\n\nThe finalized state writer at `zebra-state/src/service/finalized_state/zebra_db/transparent.rs` iterates all transaction outputs in a block and credits them to per-address balances before iterating inputs and debiting spent outputs. When a block contains many transparent self-spends to the same address, the intermediate credit-only balance can exceed the `MAX_MONEY` supply cap even though the final net balance (credits minus debits) is valid.\n\nThe code panics on the intermediate overflow via `.expect()` on the balance addition. Under Zebra's `panic = \"abort\"` release profile, this terminates the process. On restart, the node re-downloads and re-processes the same consensus-valid block, triggering the same panic.\n\nAn attacker with approximately 1,100–2,100 ZEC and mining capability can construct a block that permanently halts all Zebra nodes. The attacker recovers their capital (the self-spends return funds to the same address), so the net cost is the mining effort only.\n\n### Patches\n\nPatched in Zebra 4.4.2. The fix processes credits and debits together per transaction rather than all credits then all debits, matching zcashd's approach.\n\n### Workarounds\n\nNo workaround is available. Upgrade to Zebra 4.4.2.\n\n### Impact\n\nA single consensus-valid mined block can permanently halt all Zebra nodes on the network. The halt persists across restarts. Recovery requires deploying a patched version. Downstream consumers (light wallets, exchanges, mining infrastructure) lose service for the duration of the halt.\n\n### Credit\n\nReported by `@sangsoo-osec`.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "crates.io",
      "name" : "zebra-state"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "7.0.0"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 6.0.0"
    }
  }, {
    "package" : {
      "ecosystem" : "crates.io",
      "name" : "zebrad"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "4.5.0"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 4.4.1"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/ZcashFoundation/zebra/security/advisories/GHSA-w834-cf6p-9m9w"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/ZcashFoundation/zebra"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-248" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-07-02T19:44:54Z",
    "nvd_published_at" : null
  }
}