{"id":"GHSA-9fvj-xqr2-xwg8","revision":"f7ff51e58991424ea5234e12066abc82","records":[{"revision":"f7ff51e58991424ea5234e12066abc82","observedAt":"2026-10-24T13:19:41.952+00:00","statement":{"source":"osv","id":"GHSA-9fvj-xqr2-xwg8","aliases":["CVE-2025-58157","GO-2025-3929"],"title":"gnark affected by denial of service when computing scalar multiplication using fake-GLV algorithm","description":"### 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","state":0,"publishedAt":"2025-08-29T20:20:13+00:00","modifiedAt":"2025-09-17T17:42:12.997037+00:00","affected":[{"ecosystem":"Go","name":"github.com/consensys/gnark","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0.12.0"},{"kind":"fixed","version":"0.13.0"}]}],"versions":["0.12.0"],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V3","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"HIGH"}],"references":["https://github.com/Consensys/gnark/security/advisories/GHSA-9fvj-xqr2-xwg8","https://nvd.nist.gov/vuln/detail/CVE-2025-58157","https://github.com/Consensys/gnark/issues/1483","https://github.com/Consensys/gnark-crypto/commit/56600883e0e9f9b159e9c7000b94e76185ec3d0d","https://github.com/Consensys/gnark/commit/68be6cede36e387ab760725beabd3c96cc94e6dc","https://github.com/Consensys/gnark"],"sourceUrl":"https://github.com/advisories/GHSA-9fvj-xqr2-xwg8","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-9fvj-xqr2-xwg8","identifiers":["GHSA-9fvj-xqr2-xwg8","CVE-2025-58157","GO-2025-3929"]},"retained":false,"historicalAffected":[]}],"coverage":[]}