Thanks to visit codestin.com
Credit goes to github.com

Skip to content

x/vulndb: potential Go vuln in github.com/consensys/gnark: GHSA-9fvj-xqr2-xwg8 #3929

@GoVulnBot

Description

@GoVulnBot

Advisory GHSA-9fvj-xqr2-xwg8 references a vulnerability in the following Go modules:

Module
github.com/consensys/gnark

Description:

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

References:

Cross references:

See doc/quickstart.md for instructions on how to triage this report.

id: GO-ID-PENDING
modules:
    - module: github.com/consensys/gnark
      non_go_versions:
        - introduced: TODO (earliest fixed "0.13.0", vuln range "= 0.12.0")
      vulnerable_at: 0.14.0
summary: |-
    gnark affected by denial of service when computing scalar multiplication using
    fake-GLV algorithm in github.com/consensys/gnark
cves:
    - CVE-2025-58157
ghsas:
    - GHSA-9fvj-xqr2-xwg8
references:
    - advisory: https://github.com/Consensys/gnark/security/advisories/GHSA-9fvj-xqr2-xwg8
    - advisory: https://github.com/advisories/GHSA-9fvj-xqr2-xwg8
    - fix: https://github.com/Consensys/gnark-crypto/commit/56600883e0e9f9b159e9c7000b94e76185ec3d0d
    - fix: https://github.com/Consensys/gnark/commit/68be6cede36e387ab760725beabd3c96cc94e6dc
    - report: https://github.com/Consensys/gnark/issues/1483
source:
    id: GHSA-9fvj-xqr2-xwg8
    created: 2025-08-29T21:01:14.73184198Z
review_status: UNREVIEWED

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions