Skip to content
DoS Audit finding Intermediate

SP1 host verifier rejects PLONK and Groth16 proofs with BLAKE3 hashed public values

The host-side verifier in the prover crate only accepted SHA256 digests of public values for PLONK and Groth16 proofs, even though the code intended to accept BLAKE3 as well. Legitimate proofs whose public values were hashed with BLAKE3 would be rejected, causing a deterministic denial of service for those proofs.

mohamedfahmy Follow

Originally disclosed on Code4rena

Submitted by mohamedfahmy

The host side verifier in crates/prover/src/verify.rs validates public values using only SHA256 for PLONK, and for Groth16 it returns early on SHA256 mismatch, making the intended SHA256 or BLAKE3 fallback unreachable

  • PLONK: verify_plonk_bn254_public_inputs compares public_values.hash_bn254() against the expected digest and errors on mismatch, with no fallback. File: crates/prover/src/verify.rs lines 631–647
  • Groth16: verify_groth16_bn254_public_inputs does the same SHA256-only check and returns before calling verify_public_values, so the fallback is never tried. File: crates/prover/src/verify.rs lines 654–672
  • The comment and helper verify_public_values state that both SHA2 and BLAKE3 digests should be accepted, but they are not used in the PLONK path and are unreachable in the Groth16 path. File: crates/prover/src/verify.rs lines 676–699

The separate crates/verifier path correctly implements a dual hash fallback, so BLAKE3 paths pass there, but host verification in crates/prover fails.

Impact

Deterministic failure (DoS) for legitimate proofs when the producer uses BLAKE3 for public values (for example: PLONK_BLAKE3_ELF).

Interoperability and UX issues because no soundness reduction (still strict equality on a collision resistant digest).

View detailed Proof of Concept

Recommendation

Accept both SHA256 and BLAKE3 by adding a dual hash check and remove the early return and use the existing helper to accept both.


The original report as published on Code4rena, by mohamedfahmy. Images and videos are our own copies; raw HTML is shown as text. View it on Code4rena.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the PLONK path never calls the dual-hash helper and the Groth16 path returns early on a SHA256 mismatch, so the intended BLAKE3 fallback is unreachable.

Impact

Legitimate proofs using BLAKE3 public values fail verification deterministically, a denial of service; there is no soundness reduction since equality is still checked on a collision-resistant digest.

What the attacker needed

Proof producer uses BLAKE3 public values

The fix

The verifier should accept both SHA256 and BLAKE3 by adding a dual hash check, removing the early return and using the existing helper.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

A verifier checks that a cryptographic proof matches some public data. It does this by comparing a fingerprint (hash) of that data. The code was supposed to accept two kinds of fingerprint, but it only ever checked one, so valid proofs using the other kind were always rejected.

What is DoS?

A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.

More by mohamedfahmy

View all

2 more disclosed reports, best first.

More from Succinct

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Denial of service

The lesson behind this report.

A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.