Retroactive Grant Application - Two Medium Severity Security Findings in zcashd and Zebra (GHSA-3jg6-49c6-q99v, GHSA-5h3r-fpmj-483w)

Update: This proposal now includes GHSA-5h3r-fpmj-483w. The requested amount increases from $37,500 to $56,250, adding $18,750 for my independent contribution to the Zebra peer-ban finding with shared attribution.

Hello Zcash community,

Thank you again to the coinholders who approved my Q3 proposal and everyone who reviewed, discussed, and supported that work.

I have submitted a Q4 retroactive grant application on GitHub (#75), now requesting $56,250 USD for two completed Medium severity contributions: the zcashd V4 Sapling parsing mismatch GHSA-3jg6-49c6-q99v, and my independent report and adopted fix recommendation for Zebra’s lock-time peer-ban issue GHSA-5h3r-fpmj-483w. GitHub displays this severity as Moderate.

Shared background with my High severity proposal

My earlier forum post on the High severity finding sets out the shared background: the Q3 approvals for critical vulnerability research, recent published security findings, and the opportunity to discuss how researchers’ contributions to Zcash’s security should be rewarded.

This application brings the same discussion to two Medium findings, each with its own technical record, practical conditions, attribution, and proposed amount. The Q3 references and recent release data are available in that forum thread.

Finding 1 — V4 Sapling parsing mismatch in zcashd

For a V4 Sapling transaction with no Sapling spends or outputs, the serialized valueBalanceSapling must be zero. The malformed case has:

Serialized field Value
nSpendsSapling 0
nOutputsSapling 0
valueBalanceSapling A non-zero in-range value, such as 1

In the affected zcashd code, the V4 read path used the presence of Sapling actions to decide whether to assemble a bundle. When both action vectors were empty, it discarded the non-zero balance and exposed an empty-bundle balance of zero. The later validation check therefore examined an already-normalized object.

Zebra’s V4 parser instead rejected the same raw encoding with BadTransactionBalance.

The official advisory, published on May 8, 2026, credits sangsoo-osec as the reporter and documents the analysis and reproduction steps.

I used LLM-assisted differential code review to map the equivalent parsing and validation paths in zcashd and Zebra. I then traced the handling of the malformed balance, validated the mismatch, and examined how normalization affected later validation, transaction IDs, reserialization, and the relay and mining paths.

Practical impact and remediation

The advisory describes how the parser disagreement can reach block validation:

  1. A miner or custom raw block producer embeds the malformed transaction bytes directly into a block.
  2. The block’s Merkle root uses the normalized transaction ID that zcashd derives after parsing.
  3. zcashd can accept the raw block after normalization, while Zebra rejects those same bytes during deserialization.

The ordinary zcashd transaction relay, mempool, and mining path normalizes the encoding before block production. Submitting the malformed transaction to a stock node’s mempool alone therefore does not preserve the divergent trigger. Subsequent zcashd block relay can also reserialize the block in canonical form. These constraints are documented in the advisory’s impact analysis and are relevant to assessing this finding’s practical value.

The zcashd v6.12.2 security release, published May 6, 2026, describes the fix: malformed empty-Sapling encodings with a non-zero balance are now rejected during deserialization, matching Zebra’s behavior. The advisory lists versions below v6.12.2 as affected and v6.12.2 as patched.

Finding 2 — Zebra bans honest peers for tip-relative lock-time rejections

The additional finding, GHSA-5h3r-fpmj-483w, concerns a node wrongly banning an honest peer that is one block ahead.

A peer at tip H can correctly accept and relay a transaction with nLockTime = H and a non-final input sequence for candidate block H+1. A receiving node still at tip H-1 checks it for candidate block H and rejects it as non-final. Zebra assigned the lock-time error a score of 100, the ban threshold, to the honest peer that served the transaction. My public report #11623 traces this path and includes two unit-test reproductions. Standard wallet transactions using lock_time = 0 do not trigger this boundary case.

On 6.4.x, the IP-group ban lasts 24 hours and can cover an IPv6 /64; on 4.5.0 through 6.3.x, the per-IP ban persists until restart. The node keeps running and can accept the transaction after receiving the next block. Repeated occurrences remove useful honest connections, including when a third party deliberately broadcasts transactions at the lock-time boundary. The advisory classifies the issue as Medium and identifies 7.0.0 as patched.

I independently found and publicly reported the issue on October 8, 2026, with analysis, two unit tests, and a recommendation to exempt these tip-relative failures on the mempool path while retaining block-path scoring. The advisory separately credits SphereDonout’s private report and complete two-node reproduction, and acknowledges that my proposed fix shape was adopted in PR #11627.

The maintainers merged the fix on October 12. It prevents peer penalties for mempool lock-height and lock-time rejections while continuing to reject transactions locally until valid and preserving scoring for non-final transactions in blocks. The Zebra 7.0.0 release notes, published October 22, thank sangsoo-osec for the report.

For this additional contribution with shared attribution, I request $18,750, half the former Core Node / Medium base payout of $37,500. Together with the original V4 finding’s $37,500, the updated total is $56,250.

The question for coinholders

As discussed in my earlier forum thread, I see this round as a useful opportunity to consider what criteria should guide rewards for researchers’ contributions to Zcash’s security. These Medium findings give that discussion concrete cases.

I would welcome coinholders’ views on how to balance these considerations, whether through severity-based reference amounts, case-by-case assessments, or a combination of the two. This application puts two Medium contributions and an explicit allocation of the requested amount before coinholders to help make that discussion concrete.

3 Likes

After going through the retroactive grant proposals, I noticed that you’re also requesting funding for zcashd. I’m genuinely curious about the reasoning behind this, particularly the timing. What made you decide to submit this request now rather than during one of the previous funding rounds?

Given that zcashd has been officially end-of-life since July 17, I think it’s fair to ask what the justification is for requesting funding for a project that has already reached EOL, and how this aligns with the ecosystem’s current priorities.

I don’t mean to be overly critical, but I do think these are important questions that deserve a clear answer, especially when community funds are involved. Of course, the final decision rests with the community, but I believe proposals should be evaluated with these considerations in mind.

1 Like

After going through the retroactive grant proposals, I noticed that you’re also requesting funding for zcashd. I’m genuinely curious about the reasoning behind this, particularly the timing. What made you decide to submit this request now rather than during one of the previous funding rounds?

I didn’t apply during Q3 because I honestly didn’t expect coinholders to approve funding even for critical vulnerabilities. Now that I’ve seen them support critical findings, I’m curious to see whether they’d also be willing to fund high/med findings. Particularly, there was even a proposal for a critical vulnerability that received less than 70% support. That makes me even more curious to see how coinholders will vote on these.

Given that zcashd has been officially end-of-life since July 17, I think it’s fair to ask what the justification is for requesting funding for a project that has already reached EOL, and how this aligns with the ecosystem’s current priorities.

I don’t think it’s particularly relevant here? since this is a retroactive grant application for a vulnerability discovered and reported in the past.

I don’t mean to be overly critical, but I do think these are important questions that deserve a clear answer, especially when community funds are involved. Of course, the final decision rests with the community, but I believe proposals should be evaluated with these considerations in mind.

thanks for asking