{"answers":{"affected":"3 open source packages ship an affected version, including github.com/consensys/gnark. It affects 1 product.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-58157 exists.","fix":"Upgrade github.com/consensys/gnark to 0.13.0 or later.","what":"CVE-2025-58157 is a high-severity denial of service vulnerability in Consensys gnark, published on 29 Aug 2025. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2025-58157 and fix it if it is affected.\n\nWhat it is: CVE-2025-58157 is a high-severity denial of service vulnerability in Consensys gnark, published on 29 Aug 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-58157 exists.\n\nAffected packages and fixed versions:\n- github.com/consensys/gnark (Go): affected all versions; fixed in 0.13.0\n- github.com/consensys/gnark (Go): affected from 0.12.0; fixed in 0.13.0\n- github.com/consensys/gnark (Go): affected from 0.12.0; fixed in 0.13.0\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2025-58157/ (Markdown: https://insights.sbomify.com/CVE-2025-58157/index.md)","id":"CVE-2025-58157","markdown":"https://insights.sbomify.com/CVE-2025-58157/index.md","name":"CVE-2025-58157","record":{"aliases":["GHSA-9fvj-xqr2-xwg8","GO-2025-3929"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["denial_of_service"],"network_reachable":"yes","non_default_config":false,"product_category":"Go ZK proof library","requires_auth":"none","summary":"An attacker can cause a denial of service in the gnark library by providing inputs that prevent the fake-GLV scalar multiplication algorithm from converging.","user_interaction":"not_required","vuln_class":"denial_of_service"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"gnark","vendor":"consensys"}],"cvss":{"score":7.5,"severity":"high","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","version":"3.1"},"cwes":[{"id":"CWE-400","name":"Uncontrolled Resource Consumption"}],"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.","ecosystems":["Go"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"weaponised"},"has_fix":true,"headline":"gnark affected by denial of service when computing scalar multiplication using fake-GLV algorithm","id":"CVE-2025-58157","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Go","product":null,"products":[],"type":"denial_of_service","year":"2025"},"n_packages":3,"n_references":4,"next":{"headline":"Harness Affected by Arbitrary File Write in Gitness LFS server","id":"CVE-2025-58158"},"packages":[{"ecosystem":"Go","fixed":["0.13.0"],"introduced":["0"],"last_affected":[],"package":"github.com/consensys/gnark","purl":"pkg:golang/github.com/consensys/gnark","source":"GO-2025-3929"},{"ecosystem":"Go","fixed":["0.13.0"],"introduced":["0.12.0"],"last_affected":[],"package":"github.com/consensys/gnark","purl":null,"source":"GHSA-9fvj-xqr2-xwg8"},{"ecosystem":"Go","fixed":["0.13.0"],"introduced":["0.12.0"],"last_affected":[],"package":"github.com/consensys/gnark","purl":"pkg:golang/github.com/consensys/gnark","source":"GHSA-9fvj-xqr2-xwg8"}],"prev":{"headline":"Centurion ERP users can view hashed authentication tokens that belong to other users","id":"CVE-2025-58156"},"products":["gnark"],"published":"2025-08-29","related":[{"cvss_score":8.6,"headline":"gnark is vulnerable to signature malleability in EdDSA and ECDSA due to missing scalar checks","id":"CVE-2025-57801","kev_date_added":null,"published":"2025-08-22"},{"cvss_score":7.1,"headline":"gnark vulnerable to unsoundness in variable comparison/non-unique binary decomposition","id":"CVE-2023-44378","kev_date_added":null,"published":"2023-10-09"},{"cvss_score":5.5,"headline":"Out-of-memory during deserialization with crafted inputs","id":"CVE-2024-50354","kev_date_added":null,"published":"2024-10-31"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"Go Vulnerability Database","prefix":"GO"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"yes","exploitation":"poc","technical_impact":"partial"},"state":"PUBLISHED","updated":"2025-09-02","vendors":["Consensys"]},"summary":"An attacker can cause a denial of service in the gnark library by providing inputs that prevent the fake-GLV scalar multiplication algorithm from converging.","url":"https://insights.sbomify.com/CVE-2025-58157/"}