Three zkVMs, one missing constraint: division that proves the wrong remainder
Three zkVMs enforced the division identity and left part of the remainder rule computed but never asserted. Each constraint set admitted a wrong quotient or remainder. All three are now fixed.
Affected Pico divrem chip at brevis-network/pico 22b0aae6; ZisK arithmetic state machine at 0xPolygonHermez/zisk 6182c8be; Venus arithmetic state machine at cysic-labs/venus 130de8f2 (the repository is now cysic-zk/venus) · Fixed Pico v2.1.2 (PR #111); ZisK 683e6d9; Venus v0.3.1 (7530178) · Reporter Paul Jordan Anderson, jordan@cerinamroth.com
Summary
A zero-knowledge virtual machine makes one promise: if the proof verifies, the program ran correctly. Nobody downstream re-executes—not the verifier, not the rollup, not the bridge. So whatever the division chip accepts about a division is that division for everyone who trusts the proof.
RISC-V integer division has one correct quotient and remainder. Two facts pin it together: the identity dividend = divisor·quotient + remainder, and the remainder rule—|remainder| < |divisor|, and for signed operations the remainder takes the dividend's sign. The identity alone is satisfied by a whole family of pairs. Only the remainder rule collapses the family to one.
All three of these zkVMs got the identity right and left part of the remainder rule unasserted. They are one class and two distinct omissions. Pico dropped the magnitude bound. ZisK dropped the sign rule for negative dividends. Venus is a fork of ZisK and shipped the same files until v0.3.1.
Pico: the bound is computed, never asserted
The Pico finding is a confirmed independent rediscovery. It claims no novelty, no CVE and no credit. Brevis already had the fix from a Nethermind audit, in PR #101 of brevis-network/pico (opened 2026-05-20, fix commit "fix(alu): enforce remainder < divisor in divrem constraints"). That PR was still open when this was reported, so the bug was live on main at 22b0aae6.
Pico's divrem chip binds the identity through a MulGadget, which leaves |remainder| < |divisor| as the only thing pinning the result. It hands that to LtWordU16Gadget:
// vm/src/chips/gadgets/lt_word_u16.rs, LtWordU16Gadget::eval (L172-193)
builder.assert_bool(cols.bit); // L179: bit is boolean, and only boolean
let base = CB::Expr::from_canonical_u32(1 << 16); // L180
let diff = a - b + cols.bit * base; // L181
// If a < b, then bit must be one for diff to be in [0, 2^16).
// If a >= b, then bit must be zero for diff to be in [0, 2^16).
builder.looking_rangecheck(ByteOpcode::U16Range, diff, …, is_real); // L186-193
That is a consistency gadget, not an assertion: (bit = 1, a < b) and (bit = 0, a >= b) both satisfy it. Getting a strict less-than out of it is the caller's job, one assert_one(bit), and the chip never made the call:
// vm/src/chips/chips/alu/divrem/constraints.rs:558-564
// Dispatch abs(remainder) < max(abs(c), 1), equivalent to abs(remainder) < abs(c)
// if not division by 0.
LtWordU16Gadget::<CB::F>::eval(
builder,
local_abs_remainder.map(|v| v.into()),
local_max_abs_c_or_1.map(|v| v.into()),
local_remainder_lt_gadget,
local_remainder_check_multiplicity.into(),
);
remainder_lt_gadget appears in four places in the repository—declared, populated, destructured, evaluated—and its .bit is never asserted to be one. The multiplicity argument is (1 - is_c_0) * is_real, which is one for an ordinary division, so the gadget runs and still accepts the forgery. The asserting primitives sat one file over, unused: AssertLtColsBytes and AssertLtColsBits in lt.rs. It reads like a porting regression: a less-than primitive swapped for a same-shaped one that only computes the bit.
So REMU 10 / 3 could be proven as remainder 4, 7 or 10 by choosing quotient 2, 1 or 0. The identity holds for each.
ZisK: the remainder's sign goes free
ZisK verifies division on magnitudes and carries the signs as boolean flags, with a generated table deciding which combinations are legal. The rule that the remainder takes the dividend's sign was written in a comment and enforced only in the division-by-zero case. On the ordinary path the table required nr <= np and nothing more, so a negative dividend left the remainder's sign flag free: REM(-7, 3) could be proven as +1.
The full account has its own page: ZisK: a missing sign constraint in signed remainder. The fix, PR #1228, was written for Cody Gunton's sibling report of the unpinned quotient sign and closed this hole too. The ZisK team then accepted and published GHSA-qjgg-fcj3-p9x3, rated Critical.
Venus (Cysic): the same omission, inherited from a fork, fixed in v0.3.1
Venus is a fork of ZisK, and until v0.3.1 its arithmetic state machine was the upstream one, unchanged. Venus's arith_table.pil and arith.pil were byte-identical to the ZisK files that carried the bug (MD5 5ad47a52... and 28ba3613... on both sides). They arrived in commit 572f54f9 ("[init] monorepo rebump from 0.16", 2026-03-24) and were not modified in any public release through v0.3.0 (2026-09-07).
So a Venus build before v0.3.1 had ZisK's under-constraint exactly. The sign bits na/nb/nr/np are prover-supplied witness columns, and for a negative dividend nothing bound the remainder sign nr to the dividend sign np. The same forged witness worked:
1. Operation flags for signed 64-bit REM -7 / 3.
2. Commit (div=1, signed=1, na=1, nb=0, np=1, nr=0), magnitudes 2 and 1.
3. The magnitude identity 7 = 2*3 + 1 holds.
4. The bound 1 < 3 holds.
5. No sign-table rule rejects the row.
6. The circuit emits REM(-7, 3) = +1 instead of -1.
The fix. Venus v0.3.1 (published 2026-09-18 02:51 UTC; commit 7530178, "Fix signed remainder sign constraint") adds one constraint to arith.pil and arith_mul64.pil:
div * np * (1 - nr) * sum_all_ds === 0;
sum_all_ds is the sum of the range-checked remainder chunks. When the dividend is negative and the remainder is claimed non-negative, every remainder chunk must be zero. That rejects the forged REM(-7, 3) = +1 and still accepts the honest exact division REM(-6, 3) = 0. The release adds regression tests for REM and REMW, covering both the forged positive remainder and the valid zero remainder.
This is a different fix from upstream's. ZisK added a remainder_is_zero flag and rebuilt the sign table (commit 683e6d9, 2026-07-29). Cysic's v0.3.1 change is smaller and gets the zero-remainder case right. The one-line rule in the original report did not: rejecting every np != nr on the signed path would also have rejected honest exact divisions. Later Venus releases changed form again; as of v0.5.0, arith.pil binds a remainder_is_zero flag as upstream does.
Who needs to act. Anyone running a Venus build older than v0.3.1 should upgrade. The release notes say verifier inputs and proof format are unchanged, and that proving keys and setup artifacts must be regenerated for the updated circuit.
Vendor response. The finding was reported to Cysic by email on 2026-06-08, and that report had no reply. A follow-up went out on 2026-09-17, the day the ZisK team published its advisory, and the Cysic team replied the same day. Cysic said the fix had been made privately when the report first arrived, and they published it as v0.3.1 that day.
Scope caveat. The Venus result is verified at the constraint level. The pre-fix files are byte-identical to ZisK's, and the fix is described from the public v0.3.1 diff and release notes. No Venus prover was run, either to produce an accepted forged proof before the fix or to confirm the rejection after it.
Venus is also the clearest illustration of why this class matters beyond one project. A soundness omission in a forked zkVM does not stay in one repository. It travels with the fork into every downstream until that downstream fixes it.
What the fixes teach
Pico's fix is the missing call. At v2.1.2, constraints.rs:598 reads assert_one(local_remainder_lt_gadget.bit).
ZisK's fix is more interesting, because the one-line fix this report proposed was wrong. The report said: reject np != nr on the signed path. That also rejects honest exact divisions, where a negative dividend has a remainder of zero and zero has no sign. The old table allowed nr = 0 under a negative dividend for exactly that reason. What it lacked was anything tying nr = 0 to the remainder actually being zero. ZisK's commit 683e6d9, prompted by Cody Gunton's report of the same gap on the quotient's sign, adds result_is_zero and remainder_is_zero flags, binds each to its value in arith.pil, and makes the table demand a negative remainder whenever the dividend is negative and the flag is clear. The Venus report carried the same one-line fix, and Cysic did not take it either: v0.3.1 added the smaller constraint described above, which also gets the zero case right.
The pattern across all three: a value the circuit needs is computed into a column, range-checked or made boolean, and then used—without the one constraint that says what it must equal. Every piece looks handled. Reading the constraint list for what is asserted, not for what is computed, is what finds it.
Impact
There is no second divider. The on-chain verifier checks the proof's algebra, the settlement contract reads the proven output, the bridge releases against the proven state root, and none of them re-divides. A wrong division becomes final when the proof is accepted. That makes each of these Critical by class.
- What the prover controls. Pico: the magnitude of the remainder, and with it the quotient—several forged values per division. ZisK and Venus: the sign of any nonzero remainder of a negative dividend, by flipping one flag.
- Who is affected. Anyone settling value or state on proofs from a prover built before the fixes. For Venus that includes every deployment or downstream fork still on a build older than v0.3.1.
- Reversibility. None at the layer that matters. Recovery is a governance event: pause, roll back, fork.
Scope, stated plainly
- These are circuit-level results, not exploits against a deployed application. What was shown is that each constraint set admits a forged row. No attack on a system settling these proofs was built or attempted.
- For ZisK, the forged row was checked for table acceptance, the magnitude identity and bound, and replayed against the project's witness code for table membership and chunk range checks. The full chunked two's-complement identities were not solved by hand, and no prover was run end to end.
- For Venus there is no executed proof of concept. The result rests on the pre-fix files being byte-identical to ZisK's, plus the same analysis; the fix is described from the public v0.3.1 diff and release notes.
- The Venus finding is a root-cause duplicate of the ZisK finding. It is listed separately only because it shipped separately and the upstream patch did not fix it. Cysic fixed it in Venus v0.3.1.
- These are forge-the-result breaks. They are not key extraction, not liveness failures, and not attacks on any proof system's cryptography. The proof systems are fine; the constraints fed to them were incomplete.
- An earlier version of these reports called the class "templated on" RISC Zero's CVE-2025-52484. That CVE is a different mechanism—confusion between the
rs1andrs2registers on three-register instructions—with a public CVSS v4.0 score of 2.7 (Low), though RISC Zero rated it Critical in its own advisory. It is a comparable case of a zkVM accepting a proof of incorrect execution, and nothing more.
Disclosure timeline
- 2026-06-05: all three found and verified at the pinned commits; every file and line reference re-checked in source.
- 2026-06-06: reported to Brevis by email, and to the ZisK team by email and as a private GitHub Security Advisory.
- 2026-06-07: Brevis acknowledged the Pico report as a duplicate of the issue already fixed in PR #101. Closed as a duplicate: no credit, no CVE, no reward.
- 2026-06-08: reported to Cysic by email (info@cysic.xyz; security@cysic.xyz bounced). Cysic says a fix was applied internally at that time.
- 2026-07-27: Cody Gunton publicly reported the quotient-sign sibling in ZisK,
DIV(1, -1)proven as+1. - 2026-07-29: the ZisK team opened PR #1228, crediting that report. Its commit
683e6d9closes both holes. - 2026-08-17: Pico fix merged in PR #111 and released as
v2.1.2. PR #101 was closed unmerged. - 2026-08-18 / 2026-08-26: ZisK
v1.1.0-alphaandv1.2.0-alphareleased, both containing the fix. - 2026-09-07: the last of the 90-day windows proposed to the three closed.
- 2026-09-17: the ZisK team accepted GHSA-qjgg-fcj3-p9x3, noted that PR #1228 had already fixed it, and published it. Follow-up sent to Cysic; the Cysic team replied the same day.
- 2026-09-18 (UTC): Venus
v0.3.1released with the fix. - 2026-11-27: pre-publication notice sent to Cysic; Cysic asked to review the Venus section.
- 2026-11-29: Cysic approved the revised Venus section.
- 2026-11-30: Cysic agreed to publication ahead of the planned 2026-12-11 date.
- 2026-12-02: published.
Good-faith coordinated disclosure throughout, each report made unconditionally. No bounty program covered any of the three.