CVE-2025-58157: CWE-400: Uncontrolled Resource Consumption in Consensys gnark
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.
AI Analysis
Technical Summary
CVE-2025-58157 is a high-severity vulnerability affecting version 0.12.0 of Consensys' gnark, a zero-knowledge proof system framework widely used in cryptographic applications. The vulnerability is classified under CWE-400, indicating uncontrolled resource consumption leading to a denial of service (DoS). Specifically, the issue arises during the computation of scalar multiplication when using the fake-GLV algorithm. This algorithm, designed to optimize elliptic curve operations, fails to converge quickly enough for certain crafted inputs, causing excessive resource consumption. As a result, an attacker can trigger prolonged computation times or resource exhaustion, effectively denying service to legitimate users or processes relying on gnark. The vulnerability does not impact confidentiality or integrity but severely affects availability. The flaw requires no authentication or user interaction and can be exploited remotely, as indicated by the CVSS vector (AV:N/AC:L/PR:N/UI:N). The vendor addressed this issue in version 0.13.0 by improving the convergence behavior of the fake-GLV algorithm, mitigating the risk of resource exhaustion. No known exploits have been reported in the wild to date, but the high CVSS score of 7.5 reflects the significant potential impact on systems using the vulnerable version.
Potential Impact
For European organizations, the impact of CVE-2025-58157 can be substantial, particularly for those involved in blockchain, cryptographic research, or applications relying on zero-knowledge proofs implemented via gnark. A successful exploitation could lead to denial of service conditions, disrupting critical cryptographic operations, transaction validations, or privacy-preserving computations. This disruption could affect financial institutions, research centers, and technology companies leveraging zero-knowledge proofs for compliance, privacy, or security purposes. Given the increasing adoption of zero-knowledge proofs in privacy-focused applications and blockchain scalability solutions, the availability impact could cascade into service outages, delayed transactions, or degraded system performance. Although the vulnerability does not compromise data confidentiality or integrity, the denial of service could hinder operational continuity and damage organizational reputation. Additionally, the lack of authentication requirements means attackers can exploit the vulnerability remotely, increasing the threat surface for European entities exposed to the internet.
Mitigation Recommendations
European organizations should immediately upgrade gnark to version 0.13.0 or later, where the vulnerability has been patched. For environments where immediate upgrading is not feasible, implementing input validation and rate limiting on scalar multiplication requests can reduce the risk of resource exhaustion. Monitoring resource usage patterns and setting thresholds for computation time can help detect and mitigate ongoing exploitation attempts. Incorporating anomaly detection systems to identify unusual spikes in CPU or memory usage related to cryptographic operations is advisable. Additionally, organizations should audit their cryptographic libraries and dependencies to ensure no legacy versions of gnark remain in use. For critical systems, isolating gnark operations within sandboxed or containerized environments can limit the impact of potential DoS attacks. Finally, maintaining up-to-date threat intelligence and subscribing to vendor advisories will help organizations respond promptly to any emerging exploit developments.
Affected Countries
Germany, France, United Kingdom, Netherlands, Switzerland, Luxembourg
CVE-2025-58157: CWE-400: Uncontrolled Resource Consumption in Consensys gnark
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.
AI-Powered Analysis
Technical Analysis
CVE-2025-58157 is a high-severity vulnerability affecting version 0.12.0 of Consensys' gnark, a zero-knowledge proof system framework widely used in cryptographic applications. The vulnerability is classified under CWE-400, indicating uncontrolled resource consumption leading to a denial of service (DoS). Specifically, the issue arises during the computation of scalar multiplication when using the fake-GLV algorithm. This algorithm, designed to optimize elliptic curve operations, fails to converge quickly enough for certain crafted inputs, causing excessive resource consumption. As a result, an attacker can trigger prolonged computation times or resource exhaustion, effectively denying service to legitimate users or processes relying on gnark. The vulnerability does not impact confidentiality or integrity but severely affects availability. The flaw requires no authentication or user interaction and can be exploited remotely, as indicated by the CVSS vector (AV:N/AC:L/PR:N/UI:N). The vendor addressed this issue in version 0.13.0 by improving the convergence behavior of the fake-GLV algorithm, mitigating the risk of resource exhaustion. No known exploits have been reported in the wild to date, but the high CVSS score of 7.5 reflects the significant potential impact on systems using the vulnerable version.
Potential Impact
For European organizations, the impact of CVE-2025-58157 can be substantial, particularly for those involved in blockchain, cryptographic research, or applications relying on zero-knowledge proofs implemented via gnark. A successful exploitation could lead to denial of service conditions, disrupting critical cryptographic operations, transaction validations, or privacy-preserving computations. This disruption could affect financial institutions, research centers, and technology companies leveraging zero-knowledge proofs for compliance, privacy, or security purposes. Given the increasing adoption of zero-knowledge proofs in privacy-focused applications and blockchain scalability solutions, the availability impact could cascade into service outages, delayed transactions, or degraded system performance. Although the vulnerability does not compromise data confidentiality or integrity, the denial of service could hinder operational continuity and damage organizational reputation. Additionally, the lack of authentication requirements means attackers can exploit the vulnerability remotely, increasing the threat surface for European entities exposed to the internet.
Mitigation Recommendations
European organizations should immediately upgrade gnark to version 0.13.0 or later, where the vulnerability has been patched. For environments where immediate upgrading is not feasible, implementing input validation and rate limiting on scalar multiplication requests can reduce the risk of resource exhaustion. Monitoring resource usage patterns and setting thresholds for computation time can help detect and mitigate ongoing exploitation attempts. Incorporating anomaly detection systems to identify unusual spikes in CPU or memory usage related to cryptographic operations is advisable. Additionally, organizations should audit their cryptographic libraries and dependencies to ensure no legacy versions of gnark remain in use. For critical systems, isolating gnark operations within sandboxed or containerized environments can limit the impact of potential DoS attacks. Finally, maintaining up-to-date threat intelligence and subscribing to vendor advisories will help organizations respond promptly to any emerging exploit developments.
Affected Countries
For access to advanced analysis and higher rate limits, contact root@offseq.com
Technical Details
- Data Version
- 5.1
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2025-08-27T13:34:56.186Z
- Cvss Version
- 3.1
- State
- PUBLISHED
Threat ID: 68b21c80ad5a09ad007ba040
Added to database: 8/29/2025, 9:32:48 PM
Last enriched: 8/29/2025, 9:47:49 PM
Last updated: 8/29/2025, 9:47:49 PM
Views: 2
Related Threats
CVE-2025-58159: CWE-434: Unrestricted Upload of File with Dangerous Type in LabRedesCefetRJ WeGIA
CriticalCVE-2025-57752: CWE-524: Use of Cache Containing Sensitive Information in vercel next.js
MediumCVE-2025-55173: CWE-20: Improper Input Validation in vercel next.js
MediumCVE-2025-9678: SQL Injection in Campcodes Online Loan Management System
MediumCVE-2025-57822: CWE-918: Server-Side Request Forgery (SSRF) in vercel next.js
MediumActions
Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.
Need enhanced features?
Contact root@offseq.com for Pro access with improved analysis and higher rate limits.