{"id":"CVE-2025-58157","aliases":["CVE-2025-58157","GHSA-9fvj-xqr2-xwg8","GO-2025-3929"],"related":[],"kind":"vulnerability","state":"published","title":"gnark affected by denial of service when computing scalar multiplication using fake-GLV algorithm","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"### Impact\n\nFor 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.\n\nIn case the prover accepts untrusted witness, it could lead to denial of service as the prover gets stuck in a very slowly converging loop.\n\nThanks to @feltroidprime for reporting the issue and proposing a fix.\n\n### Patches\n\nThe 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.\n\n### Workarounds\n\nThis 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.\n\n### References\n\n* See bug report https://github.com/Consensys/gnark/issues/1483\n* 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","format":"markdown","source":"ghsa"},{"lang":"en","text":"Denial of service when computing scalar multiplication using fake-GLV algorithm in github.com/consensys/gnark","format":"markdown","source":"go"},{"lang":"es","text":"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.","source":"nvd"}],"published":"2025-08-29T20:20:13.000Z","modified":"2026-10-18T21:10:00.120Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"}],"cwes":["CWE-400"],"affected":[{"ranges":[{"version":"= 0.12.0","status":"affected"}],"vendor":"Consensys","product":"gnark","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0.12.0","status":"affected","fixed":"0.13.0"}],"ecosystem":"Go","package":"github.com/consensys/gnark","purl":"pkg:golang/github.com/consensys/gnark","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.13.0"}],"ecosystem":"Go","package":"github.com/consensys/gnark","purl":"pkg:golang/github.com/consensys/gnark","source":"go"},{"ranges":[{"status":"affected","version":"0.12.0"}],"vendor":"consensys","product":"gnark","cpe":"cpe:2.3:a:consensys:gnark:0.12.0:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/Consensys/gnark/security/advisories/GHSA-9fvj-xqr2-xwg8","tags":["advisory","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/Consensys/gnark/issues/1483","tags":["exploit","issue-tracking","web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/Consensys/gnark-crypto/commit/56600883e0e9f9b159e9c7000b94e76185ec3d0d","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/Consensys/gnark/commit/68be6cede36e387ab760725beabd3c96cc94e6dc","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-58157","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/Consensys/gnark","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"yes","technicalImpact":"partial","date":"2025-09-02T14:09:34.494Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-58157","url":"https://www.cve.org/CVERecord?id=CVE-2025-58157","licence":"CVE Terms of Use","modified":"2025-09-02T14:09:48.386Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-9fvj-xqr2-xwg8","url":"https://github.com/advisories/GHSA-9fvj-xqr2-xwg8","licence":"CC-BY-4.0","modified":"2025-09-17T17:42:12.997Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2025-3929","url":"https://pkg.go.dev/vuln/GO-2025-3929","licence":"CC-BY-4.0","modified":"2026-03-03T04:57:27.659Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-58157","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-58157","licence":"Public domain","modified":"2026-10-18T21:10:00.120Z"}],"updatedAt":"2026-11-25T22:59:03.910Z","epss":{"score":0.00611,"percentile":0.506,"date":"2026-12-01T12:00:22.000Z"}}