RISC Zero fixes a serious vulnerability in the Groth16 verifier, requiring old receipts to be regenerated
The zero-knowledge proof protocol RISC Zero has released a security announcement, fixing a critical proof forgery vulnerability in its Groth16 verifier. This vulnerability allows an attacker to replace the statement hash in the Groth16 receipt with another ReceiptClaim hash chosen by the attacker, thereby allowing any statement to be accepted under the same control root, including mirror IDs, logs, and exit codes. An attacker only needs to generate a valid Groth16 receipt to forge any statement.
The root cause of the vulnerability lies in two insufficient bit decompositions along the path from proof to public statement hash fields. First, the 32 output fields packaged as public statement hash inputs in the Groth16 wrapping circuit stark_verify.circom did not undergo range checks, allowing non-standard field decompositions to encode different hashes; second, the BIT_AND_ELEM in the recursive circuit decomposes inputs into 31 bits and only checks the reassembly modulo the Baby Bear prime, resulting in a second valid decomposition for every input less than 2^31 - P.
This vulnerability has been fixed in risc0-zkvm 3.1.0 released on November 10, along with the regeneration of rv32im and the recursive circuit, updating the Poseidon254 hash and enabling new Groth16 trusted settings. Due to changes in the rv32im sealed format and circuit identifiers, receipts generated by older versions cannot be verified under 3.1.0 and must be regenerated. On-chain, the newly deployed RiscZeroGroth16Verifier (version 3.1.0, selector 0xe71e6620) has completed routing on all supported chains, while the previous 2.2.0 and 3.0 verifiers have been urgently halted.