FlawAtlas
Search the atlas
CVE-2024-1394 High

Memory leaks in code encrypting and verifying RSA payloads

Using crafted public RSA keys which are not compliant with SP 800-56B can cause a small memory leak when encrypting and verifying payloads. An attacker can leverage this flaw to gradually erode available memory to the point where the host crashes for lack of resources. Upon restart the attacker would have to begin again, but nevertheless there is the potential to deny service.

Exploit probability 1.5%
Published March 20, 2024
Required by Not available
Last source change July 8, 2026

02 / AFFECTED SOFTWARE

Affected packages

Unknown Unknown

14 explicit affected versions

Go github.com/golang-fips/go
Go github.com/golang-fips/openssl/v2
Go github.com/microsoft/go-crypto-openssl
Go github.com/microsoft/go-crypto-openssl/openssl
Go github.com/golang-fips/openssl/v2
Go github.com/microsoft/go-crypto-openssl

03 / CONNECTIONS

Connected vulnerabilities

04 / EVIDENCE

Source records

Open Source Vulnerabilities GHSA-78hx-gp6g-7mj6

Using crafted public RSA keys which are not compliant with SP 800-56B can cause a small memory leak when encrypting and verifying payloads. An attacker can leverage this flaw to gradually erode available memory to the point where the host crashes for lack of resources. Upon restart the attacker would have to begin again, but nevertheless there is the potential to deny service.

View original source
Open Source Vulnerabilities GO-2024-2660

Using crafted public RSA keys can cause a small memory leak when encrypting and verifying payloads. This can be gradually leveraged into a denial of service attack.

View original source
Open Source Vulnerabilities CVE-2024-1394

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.

View original source

05 / REFERENCES

Further evidence