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

Published Mar 25, 2026
·
Updated

Incorrect Failure Handling in RSA KEM RSASVE Encapsulation

Other sources

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.

RSApublicencrypt() 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 EVPPKEYencapsulate() 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 EVPPKEYpubliccheck() or EVPPKEYpubliccheckquick() before EVPPKEYencapsulate() 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.

MITRE

Affected Software

7 affected componentsFixes available
Microsoft azl3 openssl 3.3.5-4
OpenSSL OpenSSL>=3.0.0<3.0.20
OpenSSL OpenSSL>=3.3.0<3.3.7
OpenSSL OpenSSL>=3.4.0<3.4.5
OpenSSL OpenSSL>=3.5.0<3.5.6
OpenSSL OpenSSL>=3.6.0<3.6.2
IBM Observability with Instana (Agent)<=Build 1.0.303 to 1.0.320

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Compensating control

    As a workaround, call EVP_PKEY_public_check() or EVP_PKEY_public_check_quick() before EVP_PKEY_encapsulate() when using RSASVE key encapsulation to mitigate incorrect failure handling that can disclose uninitialized ciphertext buffer contents.

Event History

Mar 25, 2026
Data Sourced
via Red Hat·03:14 AM
DescriptionSeverityAffected Software
Apr 7, 2026
CVE Published
via MITRE·10:00 PM
Data Sourced
via MITRE·10:00 PM
DescriptionWeakness
Data Sourced
via NVD·10:16 PM
RemedyDescriptionSeverityWeaknessAffected Software
Apr 9, 2026
Data Sourced
via Microsoft·08:02 AM
DescriptionSeverityWeaknessAffected Software
Updated
via Microsoft·08:02 AM
DescriptionSeverity
Jul 27, 2026
Data Sourced
via IBM·12:00 AM
DescriptionAffected Software

Parent advisories

This vulnerability appears in the following advisories.

Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-31790?

CVE-2026-31790 has a high severity due to its ability to expose sensitive memory content.

2

How do I fix CVE-2026-31790?

To fix CVE-2026-31790, update to a version of OpenSSL that is not affected by this vulnerability.

3

What applications are affected by CVE-2026-31790?

CVE-2026-31790 affects applications using RSA KEM RSASVE key encapsulation in OpenSSL versions between 3.0.0 and 3.6.2.

4

What is the impact of CVE-2026-31790?

The impact of CVE-2026-31790 includes the potential for a malicious peer to receive contents of an uninitialized memory buffer.

5

Is CVE-2026-31790 related to any specific OpenSSL versions?

Yes, CVE-2026-31790 specifically impacts OpenSSL versions from 3.0.0 to 3.6.2.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203