---
title: "OpenSSL Bug Exposes Data via RSA Encryption Failure"
date: 2026-04-08
author: "Sofia Ramirez"
featured_image: "https://sqmagazine.co.uk/wp-content/uploads/2026/04/openssl-bug-exposes-data-via-rsa-encryption-failure.jpg"
categories:
  - name: "Cybersecurity"
    url: "/cybersecurity.md"
tags:
  - name: "News"
    url: "/tag/news.md"
---

# OpenSSL Bug Exposes Data via RSA Encryption Failure

A newly disclosed vulnerability in OpenSSL could allow attackers to extract sensitive data from application memory during encryption operations.

## Quick Summary – TLDR:

- OpenSSL vulnerability CVE 2026 31790 exposes uninitialized memory during RSA key exchange.
- A flaw in error handling logic causes failed encryption to be treated as successful.
- Attackers can exploit this using malformed RSA public keys.
- Security updates released for OpenSSL 3.x versions, users urged to patch immediately.

## What Happened?

OpenSSL released a security advisory on April 7, 2026, highlighting multiple vulnerabilities, including a key issue in RSA key encapsulation. The flaw allows applications to mistakenly process failed encryption attempts as valid, potentially exposing sensitive memory data.

The issue has been classified as **moderate severity**, but security experts warn it could still lead to significant data exposure in real world scenarios.

> ⚠️ \*\*Vulnerability Alert:\*\* Multiple vulnerabilities in OpenSSL 3.6.x (eight CVEs: RSA KEM, AES-CFB-128, DANE, CMS, delta CRL, hex conversion)  
> 📅 \*\*Timeline:\*\* Disclosure: 2026-03-13, Patch: 2026-04-07  
>   
> 🆔 \*\*CVE-2026-31790\*\*  
>   
> 🆔 \*\*CVE-2026-2673\*\* | 📊 CVSS: 7.5 (HIGH 🟠) | 📈…
> 
> — Syed Aquib (@syedaquib77) [April 8, 2026](https://twitter.com/syedaquib77/status/2041767979407327259?ref_src=twsrc%5Etfw)

 ## A Critical Flaw in RSA Key Handling

At the center of this issue is **[CVE-2026-31790](https://ubuntu.com/security/CVE-2026-31790)**, which affects how OpenSSL handles the **RSA Key Encapsulation Mechanism**, specifically the RSASVE process used for secure key exchange.

The problem lies in how the function **RSA\_public\_encrypt()** is validated. Under normal conditions:

- **It returns the number of bytes written when encryption succeeds**.
- **It returns minus one when encryption fails**.

However, affected OpenSSL versions only check whether the return value is **non zero**. This creates a dangerous scenario where a return value of minus one is mistakenly treated as a success.

As a result, the system continues processing as if encryption worked, even though it failed.

## How Attackers Can Exploit It?

This flaw becomes exploitable when applications do not properly validate incoming RSA public keys.

An attacker can:

- **Send a malformed or invalid RSA public key**.
- **Trigger a failed encryption attempt**.
- **Exploit the faulty validation logic**.

Because the system assumes success, it proceeds to use a **ciphertext buffer that was never properly initialized**. This buffer may contain leftover data from previous operations.

That data can include:

- **Cryptographic material**.
- **Application level sensitive data**.
- **Fragments of previous memory operations**.

Over repeated interactions, a malicious actor could collect enough leaked data to reconstruct sensitive information.

## Other Vulnerabilities in the Advisory

Alongside the RSA issue, OpenSSL disclosed **six additional vulnerabilities** ranging from low severity to moderate risk. These include:

- **Out of bounds read in AES-CFB-128 mode that can cause crashes on certain systems.**
- **Use after free bug in DANE clients that may lead to memory corruption.**
- **Multiple NULL pointer dereference issues that can trigger application crashes.**
- **A heap buffer overflow affecting 32-bit platforms.**

While these are labeled as low severity, they still pose risks such as **denial of service or unexpected application behavior**.

## Who Is Affected and What to Do?

The vulnerability mainly impacts **OpenSSL 3.x versions**, including:

- 3.0
- 3.3
- 3.4
- 3.5
- 3.6

Users are strongly advised to upgrade to the latest patched versions:

- **3.0.20**
- **3.3.7**
- **3.4.5**
- **3.5.6**
- **3.6.2**

Older versions such as **1.0.2 and 1.1.1 are not affected** by this specific RSA issue, though some may still require updates for other bugs.

For those unable to patch immediately, developers can reduce risk by validating keys before use. Calling **EVP\_PKEY\_public\_check()** or **EVP\_PKEY\_public\_check\_quick()** before encapsulation helps block invalid inputs and prevents the flawed execution path.

## SQ Magazine’s Takeaway

I see this as a classic example of how a **small validation mistake can lead to serious security risks**. The bug is not about breaking encryption directly, it is about **trusting a failed operation**, which is arguably more dangerous.

What stands out to me is how easily this could be exploited in systems that skip strict input validation. Even though the severity is marked moderate, the **potential for silent data leakage over time makes this far more concerning**.

If you are running OpenSSL 3.x, this is not something to delay. **Apply the patch or enforce validation checks immediately**.