7.5high
gnark affected by denial of service when computing scalar multiplication using fake-GLV algorithm
- Severity
- 7.5high CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.61% (higher than 50% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-9fvj-xqr2-xwg8GO-2025-3929
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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| Consensys gnark | = 0.12.0, 0.12.0 | CVE List, NVD |
| github.com/consensys/gnark (Go) | from 0.12.0 before 0.13.0, before 0.13.0 | GitHub Advisory Database, Go Vulnerability Database |
All scores
| GitHub_M | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| GitHub | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
Classification
SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact partial.
What each source says
CVE List
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.
GitHub Advisory Database
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
Go Vulnerability Database
Denial of service when computing scalar multiplication using fake-GLV algorithm in github.com/consensys/gnark
NVD (es)
gnark es un framework de sistema de prueba de conocimiento cero. En la versión 0.12.0, existe una potencial vulnerabilidad de denegación de servicio cuando la computación de la multiplicación escalar utiliza el algoritmo fake-GLV. Esto se debe a que el algoritmo no convergía lo suficientemente rápido para algunas de las entradas. Este problema ha sido parcheado en la versión 0.13.0.
References
| https://github.com/Consensys/gnark/security/advisories/GHSA-9fvj-xqr2-xwg8 | advisory, vendor-advisory, web | |
| https://github.com/Consensys/gnark/issues/1483 | exploit, issue-tracking, web | |
| https://github.com/Consensys/gnark-crypto/commit/56600883e0e9f9b159e9c7000b94e76185ec3d0d | patch, web | |
| https://github.com/Consensys/gnark/commit/68be6cede36e387ab760725beabd3c96cc94e6dc | patch, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2025-58157 | advisory | |
| https://github.com/Consensys/gnark | package | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2025-58157 changed 2025-09-02 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-9fvj-xqr2-xwg8 changed 2025-09-17 | CC-BY-4.0 |
| Go Vulnerability Database | GO-2025-3929 changed 2026-03-03 | CC-BY-4.0 |
| NVD | CVE-2025-58157 changed 2026-10-18 | Public domain |