CVE-2025-58157 gnark affected by denial of service when computing scalar multiplication using fake-GLV algorithm
An attacker can cause a denial of service in the gnark library by providing inputs that prevent the fake-GLV scalar multiplication algorithm from converging.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2025-58157?
CVE-2025-58157 is a high-severity denial of service vulnerability in Consensys gnark, published on 29 Aug 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
gnark is a zero-knowledge proof system framework. In version 0.12.0, there is a potential denial of service vulnerability when computing scalar multiplication is using the fake-GLV algorithm. This is because the algorithm didn't converge quickly enough for some of the inputs. This issue has been patched in version 0.13.0.
Weakness: CWE-400
Which versions are affected by CVE-2025-58157?
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.13.0 |
github.com/consensys/gnark Go | From 0.12.0 | 0.13.0 |
github.com/consensys/gnark Go | From 0.12.0 | 0.13.0 |
Products include Consensys Gnark.
How do I fix CVE-2025-58157?
Upgrade github.com/consensys/gnark to 0.13.0 or later.
Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.
Is CVE-2025-58157 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-58157 exists.
Other vulnerabilities in Consensys gnark
Sources
Also known as GHSA-9fvj-xqr2-xwg8, GO-2025-3929.