# CVE-2020-25659: RSA decryption vulnerable to Bleichenbacher timing vulnerability

> Attackers can exploit timing side-channels in RSA decryption to potentially recover plaintext, affecting applications using the python-cryptography library.

- **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:** 11 Jan 2021
- **Updated:** 4 Aug 2024
- **Also known as:** ALPINE-CVE-2020-25659, DEBIAN-CVE-2020-25659, GHSA-hggm-jpg3-v476, MGASA-2020-0438, MINI-v93q-6867-pj79, PYSEC-2021-62, SUSE-RU-2022:2355-1, SUSE-SU-2020:3592-1, SUSE-SU-2020:3629-1, UBUNTU-CVE-2020-25659, USN-4613-1, openSUSE-SU-2020:2173-1

## What is CVE-2020-25659?

CVE-2020-25659 is a medium-severity vulnerability in python-cryptography, published on 11 Jan 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

python-cryptography 3.2 is vulnerable to Bleichenbacher timing attacks in the RSA decryption API, via timed processing of valid PKCS#1 v1.5 ciphertext.

Weakness: CWE-385 (Covert Timing Channel)

## Which versions are affected by CVE-2020-25659?

3 open source packages ship an affected version, including cryptography. It affects 2 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `cryptography` | PyPI | All versions | 3.2 |
| `cryptography` | PyPI | All versions | 3.2 |
| `cryptography` | PyPI | All versions | 3.2.1 |
| `python-cryptography` | SUSE:Enterprise Storage 5 | All versions | 2.1.4-7.31.1 |
| `python-cryptography` | SUSE:HPE Helion OpenStack 8 | All versions | 2.1.4-7.31.1 |
| `python-cryptography` | SUSE:Linux Enterprise Module for Basesystem 15 SP2 | All versions | 2.8-3.3.1 |
| `python-cryptography` | SUSE:Linux Enterprise Module for Basesystem 15 SP4 | All versions | 3.3.2-150400.16.3.1 |
| `python-cryptography` | SUSE:Linux Enterprise Module for Python 2 15 SP2 | All versions | 2.8-3.3.1 |
| `python-cryptography` | SUSE:Linux Enterprise Server 12 SP2-BCL | All versions | 2.1.4-7.31.1 |
| `python-cryptography` | SUSE:Linux Enterprise Server 12 SP2-LTSS | All versions | 2.1.4-7.31.1 |
| `python-cryptography` | SUSE:Linux Enterprise Server 12 SP3-BCL | All versions | 2.1.4-7.31.1 |
| `python-cryptography` | SUSE:Linux Enterprise Server 12 SP3-LTSS | All versions | 2.1.4-7.31.1 |
| `python-cryptography` | SUSE:Linux Enterprise Server 12 SP4-LTSS | All versions | 2.1.4-7.31.1 |
| `python-cryptography` | SUSE:Linux Enterprise Server 12 SP5 | All versions | 2.1.4-7.31.1 |
| `python-cryptography` | SUSE:Linux Enterprise Server for SAP Applications 12 SP2 | All versions | 2.1.4-7.31.1 |
| `python-cryptography` | SUSE:Linux Enterprise Server for SAP Applications 12 SP3 | All versions | 2.1.4-7.31.1 |
| `python-cryptography` | SUSE:Linux Enterprise Server for SAP Applications 12 SP4 | All versions | 2.1.4-7.31.1 |
| `python-cryptography` | SUSE:Linux Enterprise Server for SAP Applications 12 SP5 | All versions | 2.1.4-7.31.1 |
| `python-cryptography` | SUSE:OpenStack Cloud 7 | All versions | 2.1.4-7.31.1 |
| `python-cryptography` | SUSE:OpenStack Cloud 8 | All versions | 2.1.4-7.31.1 |
| `python-cryptography` | SUSE:OpenStack Cloud 9 | All versions | 2.1.4-7.31.1 |
| `python-cryptography` | SUSE:OpenStack Cloud Crowbar 8 | All versions | 2.1.4-7.31.1 |
| `python-cryptography` | SUSE:OpenStack Cloud Crowbar 9 | All versions | 2.1.4-7.31.1 |
| `python-cryptography` | openSUSE:Leap 15.2 | All versions | 2.8-lp152.2.3.1 |
| `python-cryptography` | openSUSE:Leap 15.4 | All versions | 3.3.2-150400.16.3.1 |
| `python-cryptography-vectors` | openSUSE:Leap 15.4 | All versions | 3.3.2-150400.7.3.1 |

Products: Cryptography.io Cryptography, Oracle Communications Cloud Native Core Network Function Cloud Native Environment.

## How do I fix CVE-2020-25659?

Upgrade cryptography to a fixed version for your release line: 3.2 or 3.2.1.

## Is CVE-2020-25659 being exploited?

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

## Other vulnerabilities in python-cryptography

- [CVE-2020-36242](https://insights.sbomify.com/CVE-2020-36242/): PyCA Cryptography symmetrically encrypting large values can lead to integer overflow (critical 9.1)
- [CVE-2026-26007](https://insights.sbomify.com/CVE-2026-26007/): cryptography Subgroup Attack Due to Missing Subgroup Validation for SECT Curves (high 8.2)
- [CVE-2024-26130](https://insights.sbomify.com/CVE-2024-26130/): cryptography NULL pointer dereference with pkcs12.serialize_key_and_certificates when called with a non-matching certificate and private key and an hmac_hash override (high 7.5)
- [CVE-2023-38325](https://insights.sbomify.com/CVE-2023-38325/): cryptography mishandles SSH certificates (high 7.5)
- [CVE-2026-39892](https://insights.sbomify.com/CVE-2026-39892/): cryptography has a buffer overflow if non-contiguous buffers were passed to APIs (medium 6.9)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2020-25659 and fix it if it is affected.

What it is: CVE-2020-25659 is a medium-severity vulnerability in python-cryptography, published on 11 Jan 2021. 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-2020-25659 in the wild and no public exploit code.

Affected packages and fixed versions:
- cryptography (PyPI): affected all versions; fixed in 3.2
- cryptography (PyPI): affected all versions; fixed in 3.2
- cryptography (PyPI): affected all versions; fixed in 3.2.1

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-2020-25659/ (Markdown: https://insights.sbomify.com/CVE-2020-25659/index.md)
```

## Sources

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

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