CVE-2025-58157 gnark affected by denial of service when computing scalar multiplication using fake-GLV algorithm

High 7.5 Published Updated

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.

PackageAffectedFixed in
github.com/consensys/gnark GoAll versions0.13.0
github.com/consensys/gnark GoFrom 0.12.00.13.0
github.com/consensys/gnark GoFrom 0.12.00.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.

Sources

Also known as GHSA-9fvj-xqr2-xwg8, GO-2025-3929.

Is CVE-2025-58157 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free