CVE-2025-58157
highpriority · track · 0EPSS 0.005 · 44 %ileEUUSEPSS · scored 2026-10-27
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.
cvss
Technical severity, 0–10. One row per scoring source.
base score 0–10 · higher = more severe · hover a vector to decode⚠ sources disagree · medium–high · 6.9–7.5
ssvc
A stakeholder decision — act, attend, or track — from exploitation and impact.
weaknesses
The CWE weakness classes this flaw belongs to.
affected products (4)
Products and version ranges known to be affected.
advisories (2)
Vendor and ecosystem advisories describing this.
- GHSA-9fvj-xqr2-xwg8gnark affected by denial of service when computing scalar multiplication using fake-GLV algorithm2025-08-29ghsa · osvUS
### Impact For optimizing the scalar multiplication algorithm in circuit for some curves, gnark uses fake-GLV algorithm in case the curve doesn't support true-GLV. For this to work, we need to compute the scalar decomposition using the Half GCD method in gnark-crypto. However, for some of the inputs the algorithm didn't converge quickly enough. In case the prover accepts untrusted witness, it could lead to denial of service as the prover gets stuck in a very slowly converging loop. Thanks to @feltroidprime for reporting the issue and proposing a fix. ### Patches The issue has been patched in gnark-crypto commit https://github.com/Consensys/gnark-crypto/commit/56600883e0e9f9b159e9c7000b94e76185ec3d0d. The dependency update is implemented in gnark commit https://github.com/Consensys/gnark/commit/68be6cede36e387ab760725beabd3c96cc94e6dc. ### Workarounds This update doesn't require recompiling the circuits as the issue is in the hint function. The users can update the gnark-crypto dependency to the fixed version. ### References * See bug report https://github.com/Consensys/gnark/issues/1483 * Fake GLV description https://ethresear.ch/t/fake-glv-you-dont-need-an-efficient-endomorphism-to-implement-glv-like-scalar-multiplication-in-snark-circuits/20394
- GO-2025-3929Denial of service when computing scalar multiplication using fake-GLV algorithm in github.com/consensys/gnark2025-09-17vendor · osvUS
Denial of service when computing scalar multiplication using fake-GLV algorithm in github.com/consensys/gnark
also known as (5)
Other names and identifiers for this entity.
sources
Which sources assert this record, and when.
references (15)
External citations — patches, advisories, analysis.
- https://access.redhat.com/security/cve/cve-2025-58157cnnvd
- https://github.com/Consensys/gnark-crypto/commit/56600883e0e9f9b159e9c7000b94e76185ec3d0dcnnvd
- https://github.com/Consensys/gnark/commit/68be6cede36e387ab760725beabd3c96cc94e6dccnnvd
- https://github.com/Consensys/gnark/issues/1483cnnvd
- https://github.com/Consensys/gnark/releasesPatchcnnvd
- https://github.com/Consensys/gnark/security/advisories/GHSA-9fvj-xqr2-xwg8cnnvd
- https://nvd.nist.gov/vuln/detail/CVE-2025-58157cnnvd
- https://github.com/Consensys/gnark-crypto/commit/56600883e0e9f9b159e9c7000b94e76185ec3d0denisa_euvd
Attackers weaponise vulnerabilities like this against internet-exposed services. See what is exposed on your perimeter with a free passive scan.
Free scan