---
id: CVE-2026-31790
title: |-
  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 da…
summary: |-
  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 da…
severity: high
cvss: 7.5
cvssVector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N'
cwe:
  - CWE-754
  - CWE-824
vendor: openssl
product: openssl
affected:
  - 'openssl >= 3.0.0, < 3.0.20'
  - 'openssl >= 3.3.0, < 3.3.7'
  - 'openssl >= 3.4.0, < 3.4.5'
  - 'openssl >= 3.5.0, < 3.5.6'
  - 'openssl >= 3.6.0, < 3.6.2'
patched:
  - openssl 3.6.2
published: '2026-04-07'
updated: '2026-07-24'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2026-31790'
references:
  - url: >-
      https://github.com/openssl/openssl/commit/001e01db3e996e13ffc72386fe79d03a6683b5ac
    label: openssl-security@openssl.org
  - url: >-
      https://github.com/openssl/openssl/commit/abd8b2eec7e3f3fda60ecfb68498b246b52af482
    label: openssl-security@openssl.org
  - url: >-
      https://github.com/openssl/openssl/commit/b922e24e5b23ffb9cb9e14cadff23d91e9f7e406
    label: openssl-security@openssl.org
  - url: >-
      https://github.com/openssl/openssl/commit/d5f8e71cd0a54e961d0c3b174348f8308486f790
    label: openssl-security@openssl.org
  - url: >-
      https://github.com/openssl/openssl/commit/eed200f58cd8645ed77e46b7e9f764e284df379e
    label: openssl-security@openssl.org
  - url: 'https://openssl-library.org/news/secadv/20260407.txt'
    label: openssl-security@openssl.org
  - url: 'https://cert-portal.siemens.com/productcert/html/ssa-032379.html'
    label: 0b142b55-0307-4c5a-b3c9-f314f3fb7c5e
  - url: >-
      https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-31790.json
  - url: 'https://access.redhat.com/security/cve/CVE-2026-31790'
  - url: 'https://bugzilla.redhat.com/show_bug.cgi?id=2451094'
  - url: 'https://www.cve.org/CVERecord?id=CVE-2026-31790'
  - url: 'https://nvd.nist.gov/vuln/detail/CVE-2026-31790'
  - url: 'https://access.redhat.com/errata/RHSA-2026:54187'
  - url: 'https://access.redhat.com/errata/RHSA-2026:43252'
  - url: 'https://access.redhat.com/errata/RHSA-2026:43226'
  - url: 'https://access.redhat.com/errata/RHSA-2026:44231'
  - url: 'https://access.redhat.com/errata/RHSA-2026:39297'
  - url: 'https://access.redhat.com/errata/RHSA-2026:19066'
  - url: 'https://access.redhat.com/errata/RHSA-2026:19218'
  - url: 'https://access.redhat.com/errata/RHSA-2026:27745'
  - url: 'https://access.redhat.com/errata/RHSA-2026:27746'
  - url: 'https://access.redhat.com/errata/RHSA-2026:28832'
  - url: 'https://access.redhat.com/errata/RHSA-2026:27744'
  - url: 'https://access.redhat.com/errata/RHSA-2026:39981'
  - url: 'https://access.redhat.com/errata/RHSA-2026:27998'
  - url: 'https://access.redhat.com/errata/RHSA-2026:33313'
  - url: 'https://access.redhat.com/errata/RHSA-2026:28211'
  - url: 'https://access.redhat.com/errata/RHSA-2026:7261'
  - url: 'https://access.redhat.com/errata/RHSA-2026:22634'
  - url: 'https://access.redhat.com/errata/RHSA-2026:34102'
  - url: 'https://access.redhat.com/errata/RHSA-2026:12195'
  - url: 'https://access.redhat.com/errata/RHSA-2026:44481'
  - url: 'https://access.redhat.com/errata/RHSA-2026:58981'
  - url: 'https://access.redhat.com/errata/RHSA-2026:21275'
  - url: 'https://access.redhat.com/errata/RHSA-2026:71542'
tags:
  - nvd
  - csaf
  - vex
  - red-hat
epss: 0.00448
epssPercentile: 0.36233
ingestedAt: '2026-07-25T23:05:58.234Z'
scores:
  nvd: 7.5
  vendor: 5.9
---

## Overview

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.

## Affected

- `openssl >= 3.0.0, < 3.0.20`
- `openssl >= 3.3.0, < 3.3.7`
- `openssl >= 3.4.0, < 3.4.5`
- `openssl >= 3.5.0, < 3.5.6`
- `openssl >= 3.6.0, < 3.6.2`

## Remediation

Upgrade past the affected range:

- `openssl 3.6.2`

## Vendor advisories

- **RHSA-2026:54187** · Red Hat · fixed in: Red Hat OpenShift Container Platform 4.13 · released 2026-08-20 · [advisory](https://access.redhat.com/errata/RHSA-2026:54187)
- **RHSA-2026:43252** · Red Hat · fixed in: Red Hat OpenShift Container Platform 4.14 · released 2026-07-31 · [advisory](https://access.redhat.com/errata/RHSA-2026:43252)
- **RHSA-2026:43226** · Red Hat · fixed in: Red Hat OpenShift Container Platform 4.15 · released 2026-07-31 · [advisory](https://access.redhat.com/errata/RHSA-2026:43226)
- **RHSA-2026:44231** · Red Hat · fixed in: Red Hat OpenShift Container Platform 4.19 · released 2026-07-29 · [advisory](https://access.redhat.com/errata/RHSA-2026:44231)
- **RHSA-2026:39297** · Red Hat · fixed in: Red Hat Enterprise Linux AppStream (v. 10), Red Hat Enterprise Linux CodeReady Linux Builder (v. 10) · released 2026-07-14 · [advisory](https://access.redhat.com/errata/RHSA-2026:39297)
- **RHSA-2026:19066** · Red Hat · fixed in: Red Hat Enterprise Linux AppStream (v. 10), Red Hat Enterprise Linux BaseOS (v. 10) · released 2026-05-19 · [advisory](https://access.redhat.com/errata/RHSA-2026:19066)
- **RHSA-2026:19218** · Red Hat · fixed in: Red Hat Enterprise Linux AppStream (v. 9), Red Hat Enterprise Linux BaseOS (v. 9) · released 2026-05-19 · [advisory](https://access.redhat.com/errata/RHSA-2026:19218)
- **RHSA-2026:27745** · Red Hat · fixed in: Red Hat Enterprise Linux BaseOS EUS (v. 10.0) · released 2026-06-22 · [advisory](https://access.redhat.com/errata/RHSA-2026:27745)
- **RHSA-2026:27746** · Red Hat · fixed in: Red Hat Enterprise Linux BaseOS (v. 10) · released 2026-06-22 · [advisory](https://access.redhat.com/errata/RHSA-2026:27746)
- **RHSA-2026:28832** · Red Hat · fixed in: Red Hat Enterprise Linux BaseOS E4S (v.9.2), Red Hat Enterprise Linux BaseOS E4S (v.9.4), Red Hat Enterprise Linux BaseOS EUS (v.9.6) · released 2026-06-24 · [advisory](https://access.redhat.com/errata/RHSA-2026:28832)
- **RHSA-2026:27744** · Red Hat · fixed in: Red Hat Enterprise Linux BaseOS (v. 9) · released 2026-06-22 · [advisory](https://access.redhat.com/errata/RHSA-2026:27744)
- **Red Hat VEX** · Moderate · affected: Red Hat Enterprise Linux 9, Red Hat OpenShift Container Platform 4 · no fix planned: Red Hat OpenShift Container Platform 4, Red Hat Enterprise Linux 9 · updated 2026-09-24 · [vex](https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-31790.json)
- **RHSA-2026:71542** · Red Hat · fixed in: Red Hat Enterprise Linux AppStream EUS (v. 10.0), Red Hat Enterprise Linux BaseOS EUS (v. 10.0) · released 2026-09-24 · [advisory](https://access.redhat.com/errata/RHSA-2026:71542)
