plonky2
Affected
- introduced
1.0.0, fixed1.0.1(semver)
Fixed versions
1.0.1
Fix
- Fixed version
1.0.1cargo update -p plonky2 --precise 1.0.1
Advisory
Also known as: CVE-2025-24802
Soundness issue with Plonky2 look up tables
Impact
Lookup tables, whose length is not divisible by 26 = floor(num_routed_wires / 3) always include the 0 -> 0 input-output pair. Thus a malicious prover can always prove that f(0) = 0 for any lookup table f (unless its length happens to be divisible by 26).
The cause of problem is that the LookupTableGate-s are padded with zeros.
The fix is done by padding with an existing table pair, similarly to LookupGate.
A workaround from the user side is to extend the table (by repeating some entries) so that its length becomes divisible by 26.
Fortunately, the seemingly most common use case, namely, hash functions with table-based sbox-es, are not vulnerable:
A malicious prover exploiting this could cheat a circuit which statement is the following:
x + f(x) for some private input x, where f(x) := 100 - x is implemented by a lookup table.A malicious prover would be able to convince an honest verifier that they know an 0 <= x < 64 such that x + (100 - x) = 0.
Patches
Yes, upgrade to v1.0.1
Workarounds
No
References
High Basis: The source's own band: HIGH
1.0.0, fixed 1.0.1 (semver)1.0.1
1.0.1cargo update -p plonky2 --precise 1.0.1Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.
Check your own computer: guard packages check
Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0