CVE-2024-1394

HIGH

GO < 2.0.1 - Memory Leak

Title source: rule

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.

Scores

CVSS v3 7.5
EPSS 0.0102
EPSS Percentile 77.0%
Attack Vector NETWORK
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Classification

CWE
CWE-401
Status draft

Affected Products (4)

golang-fips/go Go
golang-fips/openssl < 2.0.1Go
microsoft/go-crypto-openssl Go
microsoft/go-crypto-openssl < 0.2.9Go

Timeline

Published Mar 21, 2024
Tracked Since Feb 18, 2026