CVE-2023-44378 gnark vulnerable to unsoundness in variable comparison/non-unique binary decomposition
Attackers can exploit unsoundness in variable comparison to create valid but non-unique bit decompositions, bypassing circuit constraints in gnark.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Local or same network only
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2023-44378?
CVE-2023-44378 is a high-severity vulnerability in Consensys gnark, published on 9 Oct 2023. It can only be exploited from the same machine or local network, with no action from the victim.
Official description
gnark is a zk-SNARK library that offers a high-level API to design circuits. Prior to version 0.9.0, for some in-circuit values, it is possible to construct two valid decomposition to bits. In addition to the canonical decomposition of `a`, for small values there exists a second decomposition for `a+r` (where `r` is the modulus the values are being reduced by). The second decomposition was possible due to overflowing the field where the values are defined. Upgrading to version 0.9.0 should fix the issue without needing to change the calls to value comparison methods.
Which versions are affected by CVE-2023-44378?
3 open source packages ship an affected version, including github.com/consensys/gnark. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
github.com/consensys/gnark Go | All versions | 0.9.0 |
github.com/consensys/gnark Go | All versions | 0.9.0 |
github.com/consensys/gnark Go | All versions | 0.9.0 |
Products include Consensys Gnark.
How do I fix CVE-2023-44378?
Upgrade github.com/consensys/gnark to 0.9.0 or later.
Is CVE-2023-44378 being exploited?
There is no known exploitation of CVE-2023-44378 in the wild and no public exploit code.
Other vulnerabilities in Consensys gnark
Sources
Also known as GHSA-498w-5j49-vqjg, GO-2023-2098.