FlawAtlas
Search the atlas
CVE-2025-58157 High

Denial of service when computing scalar multiplication using fake-GLV algorithm in github.com/consensys/gnark

Denial of service when computing scalar multiplication using fake-GLV algorithm in github.com/consensys/gnark

Exploit probability 0.5%
Published September 17, 2025
Required by Not available
Last source change March 3, 2026

02 / AFFECTED SOFTWARE

Affected packages

Unknown Unknown

9 explicit affected versions

Go github.com/consensys/gnark
Go github.com/consensys/gnark

1 explicit affected versions

03 / CONNECTIONS

Connected vulnerabilities

related OPENSUSE-SU-2026:21483-1

04 / EVIDENCE

Source records

Open Source Vulnerabilities GO-2025-3929

Denial of service when computing scalar multiplication using fake-GLV algorithm in github.com/consensys/gnark

View original source
Open Source Vulnerabilities GHSA-9fvj-xqr2-xwg8

### 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

View original source
Open Source Vulnerabilities CVE-2025-58157

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.

View original source

05 / REFERENCES

Further evidence