Advisory Database
  • Advisories
  • Dependency Scanning
  1. cargo
  2. ›
  3. plonky2
  4. ›
  5. CVE-2025-24802

CVE-2025-24802: Soundness issue with Plonky2 look up tables

January 30, 2025

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:

  • both Monolith’s and Tip5/Tip4’s s-box tables already map 0 to 0;
  • more generally, forcing several (0,0) pairs inside such a hash function appears to be a too strong restriction to find an otherwise valid trace.

A malicious prover exploiting this could cheat a circuit which statement is the following:

  • output 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.

References

  • github.com/0xPolygonZero/plonky2
  • github.com/0xPolygonZero/plonky2/commit/091047f7f10cae082716f3738ad59a583835f7b6
  • github.com/0xPolygonZero/plonky2/security/advisories/GHSA-hj49-h7fq-px5h
  • github.com/advisories/GHSA-hj49-h7fq-px5h
  • nvd.nist.gov/vuln/detail/CVE-2025-24802

Code Behaviors & Features

Detect and mitigate CVE-2025-24802 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions starting from 1.0.0 before 1.0.1, version 1.0.0

Fixed versions

  • 1.0.1

Solution

Upgrade to version 1.0.1 or above.

Impact 8.6 HIGH

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:H/A:N

Learn more about CVSS

Weakness

  • CWE-1240: Use of a Cryptographic Primitive with a Risky Implementation

Source file

cargo/plonky2/CVE-2025-24802.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Mon, 12 May 2025 12:14:33 +0000.