PT-2024-34163 · Gnark+1 · Gnark+1
Pventuzelo
·
Published
2024-10-31
·
Updated
2025-09-23
·
CVE-2024-50354
CVSS v4.0
6.8
Medium
| Vector | AV:L/AC:L/AT:N/PR:L/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N |
Name of the Vulnerable Software and Affected Versions:
gnark versions 0.11.0 and earlier
Description:
The issue is related to excessive memory allocation during the deserialization of Groth16 verification keys in gnark, leading to a denial of service (DoS). This can cause the program to crash with an "out of memory" error. The problem arises when the
ReadFrom function is called to load a VerifyingKey from a file, and it allocates a large amount of memory based on the value of nbCommitments extracted from the deserialized file.Recommendations:
For gnark versions 0.11.0 and earlier, update to version 0.11.1 or later, which includes the fix for this issue. Alternatively, consider running key verification as a separate service that can halt the verification pipeline in case of an out-of-memory error when verification keys come from untrusted sources. As a temporary workaround, consider disabling the
ReadFrom function for untrusted inputs until a patch is applied.Exploit
Fix
Resource Exhaustion
Found an issue in the description? Have something to add? Feel free to write us 👾
Weakness Enumeration
Related Identifiers
Affected Products
Suse
Gnark