VYPR
High severityNVD Advisory· Published May 21, 2023· Updated Jan 21, 2025

CVE-2023-33252

CVE-2023-33252

Description

snarkjs ≤0.6.11 lacks a check that publicSignals length is less than the field modulus, enabling double-spend attacks.

AI Insight

LLM-synthesized narrative grounded in this CVE's description and references.

snarkjs ≤0.6.11 lacks a check that publicSignals length is less than the field modulus, enabling double-spend attacks.

Vulnerability

CVE-2023-33252 is a critical flaw in iden3/snarkjs versions through 0.6.11. The library fails to validate that the length of the publicSignals array is strictly less than the field modulus used in the zkSNARK proof [1][2]. This omission allows an attacker to forge proofs where publicSignals exceed the modulus, bypassing the intended verification.

Exploitation

An attacker with the ability to generate zero-knowledge proofs can craft a proof where the publicSignals array length is manipulated to be equal to or greater than the field modulus. Since snarkjs does not enforce the length bound, the modified proof passes verification [1]. The attack requires no authentication beyond the ability to submit proofs to a verifier.

Impact

Successful exploitation enables a double-spending scenario in systems that rely on snarkjs for proof verification. For example, in a cryptocurrency or token system, an attacker could reuse the same value multiple times by providing forged proofs, leading to financial loss or state corruption [2].

Mitigation

The vulnerability is fixed in snarkjs versions after 0.6.11 by adding a check that ensures publicSignals length is less than the field modulus [4]. Users should update to the latest version or apply the patch from the commit history.

AI Insight generated on May 20, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.

Affected packages

Versions sourced from the GitHub Security Advisory.

PackageAffected versionsPatched versions
snarkjsnpm
<= 0.6.11

Affected products

2

Patches

0

No patches discovered yet.

Vulnerability mechanics

AI mechanics synthesis has not run for this CVE yet.

References

4

News mentions

0

No linked articles in our index yet.