Our new X account is live! Follow @wizwand_team for updates
WorkDL logo mark

zkFuzz: Foundation and Framework for Effective Fuzzing of Zero-Knowledge Circuits

About

Zero-knowledge (ZK) circuits enable privacy-preserving computations and are central to many cryptographic protocols. Systems like Circom simplify ZK development by combining witness computation and circuit constraints in one program. However, even small errors can compromise security of ZK programs -- under-constrained circuits may accept invalid witnesses, while over-constrained ones may reject valid ones. Static analyzers are often imprecise with high false positives, and formal tools struggle with real-world circuit scale. Additionally, existing tools overlook several critical behaviors, such as intermediate computations and program aborts, and thus miss many vulnerabilities. Our theoretical contribution is the Trace-Constraint Consistency Test (TCCT), a foundational, language-independent formulation of ZK circuit bugs. TCCT provides a unified semantics that subsumes prior definitions and captures both under- and over-constrained vulnerabilities, exposing the full space of ZK bugs that elude prior tools. Our systems contribution is zkFuzz, a novel program mutation-based fuzzing framework for detecting TCCT violations. zkFuzz systematically mutates the computational logic of Zk programs guided by a novel fitness function, and injects carefully crafted inputs using tailored heuristics to expose bugs. We evaluated zkFuzz on 452 real-world ZK circuits written in Circom, a leading programming system for ZK development. zkFuzz successfully identified 85 bugs, including 59 zero-days-39 of which were confirmed by developers and \nfixed fixed, including bugs undetectable by prior works due to their fundamentally limited formulations, earning thousands of bug bounties. Our preliminary research on Noir, another emerging DSL for ZK circuit, also demonstrates the feasibility of zkFuzz to support multiple DSLs.

Hideaki Takahashi, Jihwan Kim, Suman Jana, Junfeng Yang• 2025

Related benchmarks

TaskDatasetResultRank
Bug DetectionCircom Benchmarks Small - All
True Positives58
7
Bug DetectionCircom Benchmarks Small - ZKAP
True Positives20
7
Bug DetectionCircom Benchmarks Medium - All
TP7
7
Bug DetectionCircom Benchmarks Large All
TP16
7
Bug DetectionCircom Benchmarks Large - ZKAP
TP1
7
Bug DetectionCircom Benchmarks Very Large - All
TP4
7
Bug DetectionCircom Benchmarks Total - All
TP85
7
Bug DetectionCircom Benchmarks Total - ZKAP
True Positives23
7
Bug DetectionCircom Benchmarks Very Large - ZKAP
TP2
7
Bug DetectionCircom Benchmarks Medium - ZKAP
TP0.00e+0
7
Showing 10 of 15 rows

Other info

Follow for update