AI Meets Cryptography 2: What AI Found in OpenVM's ZkVM
TL;DR Highlight
Running zkao on OpenVM found a critical bug letting provers forge any pairing equality
Who Should Read
A security or backend developer who works with zkVM or ZK verification code, or wants to automate code audits with AI
Core Mechanics
- openvm-pairing let provers fake pairing checks
- In the openvm-pairing guest library, a malicious prover could forge any pairing equality.
- This is not a bug in the zkVM proving system itself, only in code using this library.
- It was assigned CVE-2026-46669 and fixed in OpenVM 1.6.0.
- The scaling factor never got a subfield check
- The optimized check is f·u = c^λ, but nothing verified that u lies in the F_p^6 subfield.
- The code only checked that c was non-zero (u for BN254, s for BLS12-381).
- The subfield test is just three equality checks: the odd coefficients c1, c3, c5 must be zero.
- c=1, u=f⁻¹ passes the check for any f
- With c=1, c^λ=1, and with u=f⁻¹, f·u=1, so the check passes for any Miller output f.
- f⁻¹ is normally a full F_p^12 element, so a subfield check would have rejected it.
- Because the optimized routine returned success, the slower fallback doing the full final exponentiation never ran.
- The blast radius is wide
- On BLS12-381, KZG opening proofs can be forged, breaking PLONK/KZG verifiers and similar.
- On BN254, Groth16 verifiers, BLS signature checks and bridges relying on pairing equations break.
- A guest emulating the ecPairing precompile (0x08) would produce forged results and wrong EVM execution.
- The fix: assert odd coefficients are zero
- If the coefficient at index 1, 3 or 5 is not Fp2::ZERO, the function returns None.
- The fix is commit a720e2c, shipped in OpenVM 1.6.0.
- Plain LLM audits hit a wall on complex codebases
- Scans with Opus 4.6/Codex 5.3 and Opus 4.7/Codex 5.4 labeled several findings Critical or High, but none were exploitable.
- The authors say a zkVM has dense module dependencies, so per-folder parallel subagent audits don't work.
- A subagent should hand up knowledge about a module: what it assumes, what it delegates to callers, and what invariants it silently relies on.
- zkao found it after 9.5+ hours of scanning
- A flow called cryptopsy found it by going back and forth between the implementation and the academic literature (known attacks, pitfalls, cryptanalysis).
- The AI severity and the OpenVM maintainers' severity both said Critical.
- The AI produced a candidate and humans validated it, confirmed exploitability and handled disclosure.
Community Reactions
- Having an LLM write a PoC is a weak triage signal, per the authors
- The model was good at producing passing PoCs even for issues that were not real.
- Validating those PoCs took longer than triaging the original report.
- A commenter gave an easy analogy
- They compared it to a signature library that checks the signature matches a given hash but not that the signed data hashes to it.
- They said the precomputed value needed for verification wasn't checked against the situation, so trivial parameters always yield 1.
- A commenter asked whether exploitation would force L2 resets
- They asked whether most L2 ecosystems or the components connecting them would need a hard reset.
- The article says all partners building on OpenVM have upgraded to 1.6.0.
- A commenter said the dense math explains the sparse discussion
- They guessed few people commented because the post is very dense math without context.
How to Apply
- Audit your verification functions for missing hint checks
- Today, paste a ZK, signature or proof verification function into a coding agent and have it list the constraints on every prover-supplied hint.
- For values with only weak checks like non-zero, add explicit membership checks (subfield, range, degree).
- Check where a fast path skips the full verification
- Find code where a successful fast path bypasses a slower full check.
- Add tests that cover every precondition of the fast path.
- Design multi-agent audits around module knowledge summaries
- Instead of per-folder bug hunting, have each subagent output assumptions, delegated duties and implicit invariants in a fixed format.
- Have the main agent combine them to spot composition bugs across modules.
- Don't trust LLM-written PoCs that merely pass
- Check them for mocks, disabled checks, patched helpers and odd run flags.
- Have a human reproduce the exploit against unmodified code.
Try It
# Paste into Claude or ChatGPT (simplified version of the article's approach: audit verification code via module-knowledge summaries)
You are a cryptography and verification-code security auditor. Analyze the verification function below as 'module knowledge', not as a bug list.
[Code]
{{verification function code}}
Answer in this format.
1. What this function assumes
2. What it delegates to callers or the prover (hints, witnesses, other external input)
3. Invariants it silently relies on
4. For each external input, which constraints the code actually checks and which it doesn't
5. Whether a fast path on success skips a full verification
6. Whether the checks pass if the input is chosen maliciously (e.g. values like c=1, u=f^-1 that always make the equation hold)
Quote the supporting code lines for each item. If unsure, say you don't know instead of guessing.
Next step: run the same analysis on other modules, merge the results, and ask whether module A's delegated duties line up with module B's assumptions.Terminology
Related Papers
Frostbite: A new CPU architecture discovered, designed and verified by AI
AI agents designed a CPU from scratch, claiming 4.59x perf/W over a traditional core
Restricting AI agents in mobile operating systems platforms from capturing data
Signal now blocks OS-level AI agents from reading its screen on iOS 27 and Android
Actions Speak Louder than Words: Stateful Privacy Sniffing of LLM Agents via Behavioral Covert Channels in Web Interactions
Agents' link choices alone let attackers rebuild user queries at F1 0.89; SOR cuts it to 0.39.
Tracking and Limiting Unsupported Claim Propagation in Multi-Agent LLM Systems: A Provenance-Aware Framework
Passing claims with source, evidence and history kept equivalence at 5 agent stages at 96% versus 31%.
LLM assisted reverse engineering
Pointing an agent at binaries with skills and MD notes made years-long hacks feasible
Metrics-in-the-Loop: Complexity Feedback Reshapes Agent-Written Code
Injecting per-turn complexity reports into coding agents cut code erosion without changing correctness
Why is Gemini 4 Carbon taking so long?
Carbon took nearly an hour on bug fixes that Astra and Opus finished in minutes, mostly from extra unrequested work.
Weight-Space Programming builds neural networks like a 1990s researcher
LLM hand-wrote MNIST weights to 91.3%, using 1990s-style techniques