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

VectorAV: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

Weakness Enumeration

Related Identifiers

CVE-2024-50354
GHSA-CPH5-3PGR-C82G
GO-2024-3244
OPENSUSE-SU-2024:0350-1
OPENSUSE-SU-2024:14452-1
OPENSUSE-SU-2024_3950-1
OPENSUSE-SU-2025_0429-1
SUSE-SU-2024:3950-1
SUSE-SU-2025:0429-1

Affected Products

Suse
Gnark