CVE-2020-25659: Cryptography RSA Decryption Vulnerable To Bleichenbacher Vulnerability

HIGH
Advisory Identifier: GHSA-hggm-jpg3-v476
CVSS 5.9
CWE-385
Published
Advisory Summary

CVE-2020-25659 is a HIGH (CVSS 5.9) rsa decryption vulnerable to bleichenbacher vulnerability (CWE-385: Covert Timing Channel) affecting Cryptography libraries in the PyPI ecosystem. The issue involves rsa decryption vulnerable to bleichenbacher timing vulnerability. Remediation is available by upgrading affected packages to version 3.2.

CVE-2020-25659 at a Glance

CVE Identifier CVE-2020-25659
GHSA Identifier GHSA-hggm-jpg3-v476
Severity HIGH
CVSS v3.1 Base Score 5.9
CWE Classification CWE-385: Covert Timing Channel
Affected Product Cryptography
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 5.9

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity None (I:N)
Availability None (A:N)

How to Fix CVE-2020-25659

To remediate this vulnerability, upgrade all affected Cryptography dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

cryptography fixed: 3.2
pip install cryptography>=3.2
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show cryptography

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2020-25659, inspect your installed packages using pip:

pip show cryptography

Analyze the terminal output to locate any version of Cryptography in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.2), your application is affected.

Note: The pip show cryptography command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-385: Covert Timing Channel, where covert timing channels convey information by modulating some aspect of system behavior over time, so that the program receiving the information can observe system behavior and infer protected information. In Cryptography, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

RSA decryption was vulnerable to Bleichenbacher timing vulnerabilities, which would impact people using RSA decryption in online scenarios. This is fixed in cryptography 3.2.

CVE-2020-25659 Affected Cryptography Versions

1 component(s)
Fixed Versions:
3.2
Product / Package Ecosystem Affected Versions Fixed Version
cryptography
PyPI
< 3.2
3.2

References

Frequently Asked Questions

What is CVE-2020-25659?
CVE-2020-25659 is a security vulnerability in Cryptography involving RSA decryption vulnerable to Bleichenbacher timing vulnerability under CWE-385: Covert Timing Channel.
Which Cryptography versions are affected?
Affected versions include releases prior to 3.2 across affected packages: cryptography.
What version fixes CVE-2020-25659?
Upgrading to 3.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is cryptography affected?
Yes, cryptography is affected in releases prior to 3.2. Upgrade your dependency to 3.2 or later.
What is the CVSS score of CVE-2020-25659?
CVE-2020-25659 has a CVSS v3.1 base score of 5.9 (HIGH) with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N.
What CWE is associated with CVE-2020-25659?
CVE-2020-25659 is classified under CWE-385: Covert Timing Channel (Covert timing channels convey information by modulating some aspect of system behavior over time, so that the program receiving the information can observe system behavior and infer protected information.).
How can I check PyPI dependencies for CVE-2020-25659?
Run the dependency tree command: 'pip show cryptography'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-hggm-jpg3-v476",
  "modified" : "2024-11-18T16:26:10Z",
  "published" : "2020-10-27T20:33:13Z",
  "aliases" : [ "CVE-2020-25659" ],
  "summary" : "RSA decryption vulnerable to Bleichenbacher timing vulnerability",
  "details" : "RSA decryption was vulnerable to Bleichenbacher timing vulnerabilities, which would impact people using RSA decryption in online scenarios. This is fixed in cryptography 3.2. ",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "cryptography"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "3.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/pyca/cryptography/security/advisories/GHSA-hggm-jpg3-v476"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-25659"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pyca/cryptography/pull/5507"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pyca/cryptography/commit/58494b41d6ecb0f56b7c5f05d5f5e3ca0320d494"
  }, {
    "type" : "ADVISORY",
    "url" : "https://github.com/advisories/GHSA-hggm-jpg3-v476"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/pyca/cryptography"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/cryptography/PYSEC-2021-62.yaml"
  }, {
    "type" : "WEB",
    "url" : "https://pypi.org/project/cryptography"
  }, {
    "type" : "WEB",
    "url" : "https://www.oracle.com/security-alerts/cpuapr2022.html"
  }, {
    "type" : "WEB",
    "url" : "https://www.oracle.com/security-alerts/cpujul2022.html"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-385" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-10-27T20:32:44Z",
    "nvd_published_at" : "2021-01-11T16:15:00Z"
  }
}