CVE-2026-40880: Zebra Cached Mempool Verification Bypasses Consensus Vulnerability
HIGHCVE-2026-40880 is a HIGH cached mempool verification bypasses consensus vulnerability (CWE-1025: Comparison Using Wrong Factors) affecting Zebra libraries in the crates.io ecosystem. The issue involves cached mempool verification bypasses consensus rules for ahead-of-tip blocks. Remediation is available by upgrading affected packages to version 5.0.2, 4.3.1.
CVE-2026-40880 at a Glance
How to Fix CVE-2026-40880
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.
Upgrade zebra-consensus to 5.0.2
Upgrade zebrad to 4.3.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for zebra-consensus
How to Check if You Are Affected
To determine whether your application is affected by CVE-2026-40880, inspect your project dependencies for Zebra:
inspect dependencies for zebra-consensus
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 5.0.2), 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-1025: Comparison Using Wrong Factors, where the code performs a comparison between two entities, but the comparison examines the wrong factors or characteristics of the entities, which can lead to incorrect results and resultant weaknesses. 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
CVE-2026-40880 Affected Zebra Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
zebra-consensus
|
crates.io |
< 5.0.2
|
5.0.2
|
|
zebrad
|
crates.io |
< 4.3.1
|
4.3.1
|
References
Frequently Asked Questions
What is CVE-2026-40880?
Which Zebra versions are affected?
What version fixes CVE-2026-40880?
Is zebra-consensus affected?
Is zebrad affected?
What CWE is associated with CVE-2026-40880?
How can I check crates.io dependencies for CVE-2026-40880?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-xvj8-ph7x-65gf",
"modified" : "2026-04-27T16:17:07Z",
"published" : "2026-04-18T00:41:54Z",
"aliases" : [ "CVE-2026-40880" ],
"summary" : "Zebra: Cached Mempool Verification Bypasses Consensus Rules for Ahead-of-Tip Blocks",
"details" : "# CVE-2026-40880: Cached Mempool Verification Bypasses Consensus Rules for Ahead-of-Tip Blocks\n\n## Summary\n\nA logic error in Zebra's transaction verification cache could allow a malicious miner to induce a consensus split. By carefully submitting a transaction that is valid for height `H+1` but invalid for `H+2` and then mining that transaction in a block at height `H+2`, a miner could cause vulnerable Zebra nodes to accept an invalid block, leading to a consensus split from the rest of the Zcash network.\n\n## Severity\n\nHigh - This is a Consensus Vulnerability that could allow a malicious miner to induce network partitioning, service disruption, and potential double-spend attacks against affected nodes.\n\n## Affected Versions\n\nAll Zebra versions prior to version 4.3.1. (Some older versions are not affected but are no longer supported by the network)\n\n## Description\n\nThe vulnerability exists due to a performance optimization whose goal is to improve performance of transaction validation if the transaction was previously accepted into the mempool (and thus was verified as valid). That however did not take into account that a transaction can be valid for a specific height, but invalid at higher heights; for example, it can contain an expiry height, a lock time, and it is always bound to a network upgrade, all of which are height-dependant.\n\nAn attacker (specifically a malicious miner) could exploit this by (e.g. in the expiry height case):\n\n- Submitting a transaction with expiry height `H+1` (where `H` is the height of the current tip)\n- Mining a block `H+1`, and a block `H+2` that contains that same transaction, and submitting block `H+2` before `H+1`\n- Zebra nodes would accept `H+2` as valid (pending contextual verification) and wait for block `H+1`; when it arrives, Zebra would commit both blocks even if `H+2` contains an expired transaction\n- Other nodes (like `zcashd` or `zebrad` nodes without that transaction in their mempool) reject the block, resulting in a chain fork where the poisoned Zebra node is isolated.\n\n## Impact\n\n**Consensus Failure**\n\n**Attack Vector**: Network (specifically via a malicious miner).\n**Effect**: Network partition/consensus split.\n**Scope**: Any Zebra node utilizing the transaction verification cache optimization for V5 transactions.\n\n## Fixed Versions\n\nThis issue is fixed in **Zebra 4.3.1**.\n\nWe removed the performance optimization altogether, since we deemed it too risky.\n\nThe fix ensures that verification is only skipped if the transaction's full integrity—including authorization data—is validated against the mempool entry.\n\n## Mitigation\n\nUsers should upgrade to Zebra 4.3.0 or later immediately.\n\nThere are no known workarounds for this issue. Immediate upgrade is the only way to ensure the node remains on the correct consensus path and is protected against malicious chain forks.\n\n## Credits\n\nThanks to @sangsoo-osec for a thorough advisory submission that noticed the lock time issue, and to @shieldedonly with an also thorough advisory (that was submitted while we were working on the first one) who noticed that the issue applied to other aspects of the transaction validation.",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:N/VI:H/VA:H/SC:N/SI:H/SA:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "crates.io",
"name" : "zebra-consensus"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "5.0.2"
} ]
} ]
}, {
"package" : {
"ecosystem" : "crates.io",
"name" : "zebrad"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "4.3.1"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/ZcashFoundation/zebra/security/advisories/GHSA-xvj8-ph7x-65gf"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-40880"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/ZcashFoundation/zebra"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-1025" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-04-18T00:41:54Z",
"nvd_published_at" : "2026-04-21T20:17:01Z"
}
}