CVE-2024-1394

Executive Summary

CVE-2024-1394 exposes a memory leak in Golang’s RSA encryption/decryption (github.com/golang-fips/openssl/openssl/rsa.go#L113). Attacker‑controlled inputs can trigger repeated leaks of pkey and ctx objects, leading to resource exhaustion. The flaw stems from named return parameters that skip freeing these objects on error, as the deferred cleanup receives nil values. The vulnerability is not yet listed in CISA KEV.


Authoritative CVE Metadata - CVSS Base Score: 7.5 (HIGH) - Published: 2024-03-21T13:00:08.037 - Last Modified: 2026-08-21T12:16:15.653

Original Description: A memory leak flaw was found in Golang in the RSA encrypting/decrypting code, which might lead to a resource exhaustion vulnerability using attacker-controlled inputs​. The memory leak happens in github.com/golang-fips/openssl/openssl/rsa.go#L113. The objects leaked are pkey​ and ctx​. That function uses named return parameters to free pkey​ and ctx​ if there is an error initializing the context or setting the different properties. All return statements related to error cases follow the "return nil, nil, fail(...)" pattern, meaning that pkey​ and ctx​ will be nil inside the deferred function that should free them.

"Our kindness may be the most persuasive argument for that which we believe."

— Gordon Hinckley
Source: NVD