Introduction
Zero-Knowledge Proofs (ZKPs) have emerged as a foundational technology for blockchain privacy and scalability, often described as the "holy grail" of decentralized infrastructure. As ZKPs transition from academic theory to the backbone of multi-billion dollar protocols—including zkEVMs and privacy-preserving DeFi—the complexity of their implementation has created a significant security challenge. This paper provides a comprehensive taxonomy of ZKP vulnerabilities and proposes a "divide-and-conquer" auditing framework to secure the next generation of cryptographic systems.
The Problem: The Implementation Gap
The core challenge in ZKP security lies in the gap between high-level mathematical theory and low-level "circuit" implementation. A developer may correctly understand the cryptographic primitives but fail to implement the digital logic—the constraints—that execute the proof. Even a minor oversight, such as a missing bit-length check or an unconstrained variable, can allow an attacker to forge proofs, double-spend funds, or deanonymize users. Currently, there is a lack of standardized frameworks for identifying and preventing these implementation-specific bugs.
A Taxonomy of ZKP Vulnerabilities
The paper categorizes vulnerabilities based on the three fundamental pillars of Zero-Knowledge Proofs:
- Soundness Issues: These are the most dangerous flaws, where the system accepts invalid proofs. This typically occurs due to "under-constrained" circuits where the logic does not sufficiently restrict the prover's actions.
- Completeness Issues: These occur when valid proofs fail to be verified. While less risky for funds, they can lead to "bricked" applications where legitimate users are locked out (often due to "over-constrained" circuits).
- Zero-Knowledge Issues: These involve the leakage of private data, often resulting from failures in the trusted setup phase or improper handling of witness data.
The "Divide & Conquer" Auditing Framework
To systematically address these risks, the authors propose a five-layer auditing model designed to catch vulnerabilities that single-layer automated tools might miss:
- Application Layer: Focuses on high-level logic and smart contract integration.
- Prover/Verifier Layer: Examines cryptographic primitives such as hashes and commitments.
- Arithmetization Layer: Analyzes the circuit logic (e.g., R1CS or PLONKish constraints).
- Field Arithmetic Layer: Audits low-level mathematical operations like Fast Fourier Transforms (FFT) and Multi-Scalar Multiplication (MSM).
- Platform Layer: Inspects the underlying hardware, operating system, and language-specific features.
Case Studies in ZKP Security
The paper substantiates its framework through a qualitative analysis of real-world vulnerabilities found in major protocols:
- zkSync Era: A soundness bug was identified where a missing call to
enforce_zeroleft the highest 128 bits of a memory write unconstrained. This flaw could have allowed an attacker to modify withdrawal amounts and potentially steal approximately 100,000 ETH. - MACI (Minimal Anti-Collusion Infrastructure): A flaw in message type validation allowed attackers to change a "vote" to a "top-up," falsely increasing their voting balance without spending credits.
- Tornado Cash: The paper notes risks associated with nondeterministic circuits that could potentially lead to double-spending.
- Scroll & Dark Forest: Examples include over-constrained Poseidon hash circuits and missing bit-length checks in range proofs, respectively.
Key Technical Insights
The "Under-Constrained" Nightmare
The most prevalent risk in ZKP development is the "assigned but not constrained" variable. If a circuit does not mathematically force a variable to a specific value, an attacker can manipulate that variable to produce a proof that is mathematically valid but represents a fraudulent state.
The "Frozen Heart" Vulnerability
This vulnerability refers to flaws in the implementation of the Fiat-Shamir transformation, which is used to turn interactive proofs into non-interactive ones. If the implementation fails to include all necessary data in the challenge hash, an attacker can "grind" a proof until it passes verification, breaking the protocol's security entirely.
The Role of Tooling
While automated tools like Circomspect (static analysis) and Coda (formal verification) are evolving, the paper emphasizes that they are not a silver bullet. These tools often have a limited scope or produce false positives. Consequently, manual, line-by-line inspection by experts remains the gold standard for ZKP security.
Limitations and Future Work
The proposed "Divide & Conquer" strategy is labor-intensive and requires a rare combination of expertise in both advanced cryptography and software engineering. The authors call for further research into "ZK-friendly" hash functions (such as Poseidon and MiMC) and more robust formal verification frameworks capable of handling the massive scale of modern zkEVM circuits. As the industry matures, standardizing these auditing layers will be critical to maintaining trust in decentralized systems.
Summary updated