CVE-2026-31790 Incorrect Failure Handling in RSA KEM RSASVE Encapsulation

High 7.5 Published Updated

Attackers can read uninitialized memory contents via RSA KEM encapsulation if invalid public keys are used without validation, leaking sensitive data.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2026-31790?

CVE-2026-31790 is a high-severity vulnerability in Openssl Openssl, published on 7 Apr 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

Issue summary: Applications using RSASVE key encapsulation to establish a secret encryption key can send contents of an uninitialized memory buffer to a malicious peer.

Impact summary: The uninitialized buffer might contain sensitive data from the previous execution of the application process which leads to sensitive data leakage to an attacker.

RSA_public_encrypt() returns the number of bytes written on success and -1 on error. The affected code tests only whether the return value is non-zero. As a result, if RSA encryption fails, encapsulation can still return success to the caller, set the output lengths, and leave the caller to use the contents of the ciphertext buffer as if a valid KEM ciphertext had been produced.

If applications use EVP_PKEY_encapsulate() with RSA/RSASVE on an attacker-supplied invalid RSA public key without first validating that key, then this may cause stale or uninitialized contents of the caller-provided ciphertext buffer to be disclosed to the attacker in place of the KEM ciphertext.

As a workaround calling EVP_PKEY_public_check() or EVP_PKEY_public_check_quick() before EVP_PKEY_encapsulate() will mitigate the issue.

The FIPS modules in 3.6, 3.5, 3.4, 3.3, 3.1 and 3.0 are affected by this issue.

Weakness: CWE-754

Which versions are affected by CVE-2026-31790?

It affects 1 product.

Linux distribution packages (40)
openssl AlmaLinux:9All versions1:3.5.5-2.el9_8
openssl-devel AlmaLinux:9All versions1:3.5.5-2.el9_8
openssl-libs AlmaLinux:9All versions1:3.5.5-2.el9_8
openssl-perl AlmaLinux:9All versions1:3.5.5-2.el9_8
openssl-fips-provider Red Hat:enterprise_linux:10.2All versions0:3.0.7-11.el10_2
openssl-fips-provider-so Red Hat:enterprise_linux:10.2All versions0:3.0.7-11.el10_2
openssl-fips-provider-so-debuginfo Red Hat:enterprise_linux:10.2All versions0:3.0.7-11.el10_2
openssl-fips-provider-so-debugsource Red Hat:enterprise_linux:10.2All versions0:3.0.7-11.el10_2
openssl-debuginfo Red Hat:enterprise_linux:9::appstreamAll versions1:3.5.5-2.el9_8
openssl-debugsource Red Hat:enterprise_linux:9::appstreamAll versions1:3.5.5-2.el9_8
openssl-devel Red Hat:enterprise_linux:9::appstreamAll versions1:3.5.5-2.el9_8
openssl-libs-debuginfo Red Hat:enterprise_linux:9::appstreamAll versions1:3.5.5-2.el9_8
openssl-perl Red Hat:enterprise_linux:9::appstreamAll versions1:3.5.5-2.el9_8
openssl Red Hat:enterprise_linux:9::baseosAll versions1:3.5.5-2.el9_8
openssl-debuginfo Red Hat:enterprise_linux:9::baseosAll versions1:3.5.5-2.el9_8
openssl-debugsource Red Hat:enterprise_linux:9::baseosAll versions1:3.5.5-2.el9_8
openssl-fips-provider Red Hat:enterprise_linux:9::baseosAll versions0:3.0.7-11.el9_8
openssl-fips-provider-so Red Hat:enterprise_linux:9::baseosAll versions0:3.0.7-11.el9_8
openssl-fips-provider-so-debuginfo Red Hat:enterprise_linux:9::baseosAll versions0:3.0.7-11.el9_8
openssl-fips-provider-so-debugsource Red Hat:enterprise_linux:9::baseosAll versions0:3.0.7-11.el9_8
openssl-libs Red Hat:enterprise_linux:9::baseosAll versions1:3.5.5-2.el9_8
openssl-libs-debuginfo Red Hat:enterprise_linux:9::baseosAll versions1:3.5.5-2.el9_8
openssl-fips-provider Red Hat:enterprise_linux_eus:10.0All versions0:3.0.7-11.el10_0
openssl-fips-provider-so Red Hat:enterprise_linux_eus:10.0All versions0:3.0.7-11.el10_0
openssl-fips-provider-so-debuginfo Red Hat:enterprise_linux_eus:10.0All versions0:3.0.7-11.el10_0
openssl-fips-provider-so-debugsource Red Hat:enterprise_linux_eus:10.0All versions0:3.0.7-11.el10_0
openssl-fips-provider Red Hat:hummingbird:1All versions0:3.0.7-1.2.hum1
openssl-fips-provider-so Red Hat:hummingbird:1All versions0:3.0.7-1.2.hum1
openssl-fips-provider Red Hat:rhel_e4s:9.2::baseosAll versions0:3.0.7-11.el9_0
openssl-fips-provider-debugsource Red Hat:rhel_e4s:9.2::baseosAll versions0:3.0.7-11.el9_0
openssl-fips-provider-so Red Hat:rhel_e4s:9.2::baseosAll versions0:3.0.7-11.el9_0
openssl-fips-provider-so-debuginfo Red Hat:rhel_e4s:9.2::baseosAll versions0:3.0.7-11.el9_0
openssl-fips-provider Red Hat:rhel_e4s:9.4::baseosAll versions0:3.0.7-11.el9_0
openssl-fips-provider-debugsource Red Hat:rhel_e4s:9.4::baseosAll versions0:3.0.7-11.el9_0
openssl-fips-provider-so Red Hat:rhel_e4s:9.4::baseosAll versions0:3.0.7-11.el9_0
openssl-fips-provider-so-debuginfo Red Hat:rhel_e4s:9.4::baseosAll versions0:3.0.7-11.el9_0
openssl-fips-provider Red Hat:rhel_eus:9.6::baseosAll versions0:3.0.7-11.el9_0
openssl-fips-provider-debugsource Red Hat:rhel_eus:9.6::baseosAll versions0:3.0.7-11.el9_0
openssl-fips-provider-so Red Hat:rhel_eus:9.6::baseosAll versions0:3.0.7-11.el9_0
openssl-fips-provider-so-debuginfo Red Hat:rhel_eus:9.6::baseosAll versions0:3.0.7-11.el9_0

Products include Openssl Openssl.

How do I fix CVE-2026-31790?

Apply the vendor's patch.

Is CVE-2026-31790 being exploited?

There is no known exploitation of CVE-2026-31790 in the wild and no public exploit code.

All Openssl Openssl vulnerabilities

Sources

Also known as ALPINE-CVE-2026-31790, ALSA-2026:19218, AZL-81950, BELL-CVE-2026-31790, CLSA-2026-1777948139, CLSA-2026-1778072039 and 19 more.

Is CVE-2026-31790 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free