# CVE-2022-4304: Timing Oracle in RSA Decryption

> An attacker can recover plaintext from RSA decryption via timing side-channel attacks, potentially decrypting TLS traffic.

- **Severity:** Medium 5.9 (`CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 8 Feb 2023
- **Updated:** 14 Oct 2026
- **Also known as:** ALPINE-CVE-2022-4304, AZL-13302, AZL-13310, AZL-31140, AZL-34668, AZL-37662, AZL-37955, CLEANSTART-2026-SP18534, DEBIAN-CVE-2022-4304, GHSA-p52g-cm5j-mjv4, JLSEC-2026-231, OESA-2023-1428, OESA-2023-1429, OESA-2023-1430, OESA-2023-1431, RUSTSEC-2023-0007, SUSE-SU-2023:0581-1, SUSE-SU-2023:0584-1, SUSE-SU-2023:2622-1, SUSE-SU-2023:2623-1, SUSE-SU-2023:2624-1, SUSE-SU-2023:2633-1, SUSE-SU-2023:2634-1, SUSE-SU-2023:2648-1, UBUNTU-CVE-2022-4304

## What is CVE-2022-4304?

CVE-2022-4304 is a medium-severity vulnerability in Openssl Openssl, published on 8 Feb 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

A timing based side channel exists in the OpenSSL RSA Decryption implementation
which could be sufficient to recover a plaintext across a network in a
Bleichenbacher style attack. To achieve a successful decryption an attacker
would have to be able to send a very large number of trial messages for
decryption. The vulnerability affects all RSA padding modes: PKCS#1 v1.5,
RSA-OEAP and RSASVE.

For example, in a TLS connection, RSA is commonly used by a client to send an
encrypted pre-master secret to the server. An attacker that had observed a
genuine connection between a client and a server could use this flaw to send
trial messages to the server and record the time taken to process them. After a
sufficiently large number of messages the attacker could recover the pre-master
secret used for the original connection and thus be able to decrypt the
application data sent over that connection.

Weakness: CWE-203 (Observable Discrepancy)

## Which versions are affected by CVE-2022-4304?

5 open source packages ship an affected version, including openssl-src. It affects 4 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `openssl-src` | crates.io | All versions | 111.25.0 |
| `openssl-src` | crates.io | All versions | 111.25.0 |
| `openssl-src` | crates.io | From 0.0.0-0 | 111.25.0, 300.0.12 |
| `openssl-src` | crates.io | From 300.0.0 | 300.0.12 |
| `openssl-src` | crates.io | From 300.0.0 | 300.0.12 |
| `openssl-1_0_0` | SUSE:Enterprise Storage 7 | All versions | 1.0.2p-150000.3.79.1 |
| `openssl-1_0_0` | SUSE:Enterprise Storage 7.1 | All versions | 1.0.2p-150000.3.79.1 |
| `openssl-1_1` | SUSE:Linux Enterprise High Performance Computing 15 SP1-LTSS | All versions | 1.1.0i-150100.14.56.1 |
| `openssl-1_0_0` | SUSE:Linux Enterprise High Performance Computing 15 SP3-ESPOS | All versions | 1.0.2p-150000.3.79.1 |
| `openssl-1_0_0` | SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS | All versions | 1.0.2p-150000.3.79.1 |
| `openssl-1_1` | SUSE:Linux Enterprise Micro 5.3 | All versions | 1.1.1l-150400.7.42.1 |
| `openssl-1_1` | SUSE:Linux Enterprise Micro 5.4 | All versions | 1.1.1l-150400.7.42.1 |
| `openssl-1_1` | SUSE:Linux Enterprise Module for Basesystem 15 SP4 | All versions | 1.1.1l-150400.7.42.1 |
| `compat-openssl098` | SUSE:Linux Enterprise Module for Legacy 12 | All versions | 0.9.8j-106.42.1 |
| `openssl-1_0_0` | SUSE:Linux Enterprise Module for Legacy 15 SP4 | All versions | 1.0.2p-150000.3.79.1 |
| `openssl-1_0_0` | SUSE:Linux Enterprise Module for Legacy 15 SP5 | All versions | 1.0.2p-150000.3.79.1 |
| `openssl` | SUSE:Linux Enterprise Server 11 SP4 LTSS EXTREME CORE | All versions | 0.9.8j-0.106.60.1 |
| `openssl` | SUSE:Linux Enterprise Server 12 SP2-BCL | All versions | 1.0.2j-60.98.1 |
| `openssl-1_0_0` | SUSE:Linux Enterprise Server 12 SP4-ESPOS | All versions | 1.0.2p-3.78.1 |
| `openssl-1_1` | SUSE:Linux Enterprise Server 12 SP4-ESPOS | All versions | 1.1.1d-2.89.1 |
| `openssl-1_0_0` | SUSE:Linux Enterprise Server 12 SP4-LTSS | All versions | 1.0.2p-3.78.1 |
| `openssl-1_1` | SUSE:Linux Enterprise Server 12 SP4-LTSS | All versions | 1.1.1d-2.89.1 |
| `openssl-1_0_0` | SUSE:Linux Enterprise Server 12 SP5 | All versions | 1.0.2p-3.78.1 |
| `openssl-1_1` | SUSE:Linux Enterprise Server 12 SP5 | All versions | 1.1.1d-2.89.1 |
| `openssl-1_0_0` | SUSE:Linux Enterprise Server 15 SP1-LTSS | All versions | 1.0.2p-150000.3.79.1 |
| `openssl-1_1` | SUSE:Linux Enterprise Server 15 SP1-LTSS | All versions | 1.1.0i-150100.14.56.1 |
| `openssl-1_0_0` | SUSE:Linux Enterprise Server 15 SP2-LTSS | All versions | 1.0.2p-150000.3.79.1 |
| `openssl-1_0_0` | SUSE:Linux Enterprise Server 15 SP3-LTSS | All versions | 1.0.2p-150000.3.79.1 |
| `compat-openssl098` | SUSE:Linux Enterprise Server for SAP Applications 12 SP4 | All versions | 0.9.8j-106.42.1 |
| `openssl-1_0_0` | SUSE:Linux Enterprise Server for SAP Applications 12 SP4 | All versions | 1.0.2p-3.78.1 |
| `openssl-1_1` | SUSE:Linux Enterprise Server for SAP Applications 12 SP4 | All versions | 1.1.1d-2.89.1 |
| `compat-openssl098` | SUSE:Linux Enterprise Server for SAP Applications 12 SP5 | All versions | 0.9.8j-106.42.1 |
| `openssl-1_0_0` | SUSE:Linux Enterprise Server for SAP Applications 12 SP5 | All versions | 1.0.2p-3.78.1 |
| `openssl-1_1` | SUSE:Linux Enterprise Server for SAP Applications 12 SP5 | All versions | 1.1.1d-2.89.1 |
| `openssl-1_0_0` | SUSE:Linux Enterprise Server for SAP Applications 15 SP1 | All versions | 1.0.2p-150000.3.79.1 |
| `openssl-1_1` | SUSE:Linux Enterprise Server for SAP Applications 15 SP1 | All versions | 1.1.0i-150100.14.56.1 |
| `openssl-1_0_0` | SUSE:Linux Enterprise Server for SAP Applications 15 SP2 | All versions | 1.0.2p-150000.3.79.1 |
| `openssl-1_0_0` | SUSE:Linux Enterprise Server for SAP Applications 15 SP3 | All versions | 1.0.2p-150000.3.79.1 |
| `openssl-1_0_0` | SUSE:Linux Enterprise Software Development Kit 12 SP5 | All versions | 1.0.2p-3.78.1 |
| `openssl-1_1` | SUSE:Linux Enterprise Software Development Kit 12 SP5 | All versions | 1.1.1d-2.89.1 |

Products: Openssl Openssl, Stormshield Endpoint Security, Stormshield Sslvpn, Stormshield Stormshield Network Security.

## How do I fix CVE-2022-4304?

Upgrade openssl-src to a fixed version for your release line: 111.25.0 or 300.0.12.

## Is CVE-2022-4304 being exploited?

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

Public exploit code:

- https://github.com/Trinadh465/Openssl-1.1.1g_CVE-2022-4304 (github_poc): https://github.com/Trinadh465/Openssl-1.1.1g_CVE-2022-4304

## Other vulnerabilities in Openssl Openssl

- [CVE-2009-3245](https://insights.sbomify.com/CVE-2009-3245/): Null dereference in n/a (critical 10.0)
- [CVE-2006-3738](https://insights.sbomify.com/CVE-2006-3738/): Memory corruption in n/a (critical 10.0)
- [CVE-2026-63073](https://insights.sbomify.com/CVE-2026-63073/): Untrusted Sender DN Used as Format String in CMP Response Validation (critical 9.8)
- [CVE-2016-6309](https://insights.sbomify.com/CVE-2016-6309/): Use after free in n/a (critical 9.8)
- [CVE-2016-0799](https://insights.sbomify.com/CVE-2016-0799/): Integer overflow in n/a (critical 9.8)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2022-4304 and fix it if it is affected.

What it is: CVE-2022-4304 is a medium-severity vulnerability in Openssl Openssl, published on 8 Feb 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2022-4304 in the wild and no public exploit code.

Affected packages and fixed versions:
- openssl-src (crates.io): affected all versions; fixed in 111.25.0
- openssl-src (crates.io): affected all versions; fixed in 111.25.0
- openssl-src (crates.io): affected from 0.0.0-0; fixed in 111.25.0, 300.0.12
- openssl-src (crates.io): affected from 300.0.0; fixed in 300.0.12
- openssl-src (crates.io): affected from 300.0.0; fixed in 300.0.12

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2022-4304/ (Markdown: https://insights.sbomify.com/CVE-2022-4304/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2022-4304
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2022-4304
- OSV: https://osv.dev/vulnerability/CVE-2022-4304

---
From sbomify Insights: https://insights.sbomify.com/CVE-2022-4304/
Summaries are generated and may contain mistakes; the official description above is the record.
