GHSA-h4gh-qq45-vh27: Cryptography Pyca/cryptography Has A Vulnerable OpenSSL Vulnerability

MODERATE
CWE-1395
Published
Advisory Summary

GHSA-h4gh-qq45-vh27 is a MODERATE pyca/cryptography has a vulnerable openssl vulnerability (CWE-1395: Dependency on Vulnerable Third-Party Component) affecting Cryptography libraries in the PyPI ecosystem. The issue involves pyca/cryptography has a vulnerable openssl included in cryptography wheels. Remediation is available by upgrading affected packages to version 43.0.1.

GHSA-h4gh-qq45-vh27 at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-h4gh-qq45-vh27
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-1395: Dependency on Vulnerable Third-Party Component
Affected Product Cryptography
Package Ecosystem PyPI
Published Date
Last Updated

How to Fix GHSA-h4gh-qq45-vh27

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: 43.0.1
pip install cryptography>=43.0.1
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 GHSA-h4gh-qq45-vh27, 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 43.0.1), 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-1395: Dependency on Vulnerable Third-Party Component, where the product has a dependency on a third-party component that contains one or more known vulnerabilities. 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

pyca/cryptography's wheels include a statically linked copy of OpenSSL. The versions of OpenSSL included in cryptography 37.0.0-43.0.0 are vulnerable to a security issue. More details about the vulnerability itself can be found in https://openssl-library.org/news/secadv/20240903.txt. If you are building cryptography source ("sdist") then you are responsible for upgrading your copy of OpenSSL. Only users installing from wheels built by the cryptography project (i.e., those distributed on PyPI) need to update their cryptography versions.

GHSA-h4gh-qq45-vh27 Affected Cryptography Versions

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

References

Frequently Asked Questions

What is GHSA-h4gh-qq45-vh27?
GHSA-h4gh-qq45-vh27 is a security vulnerability in Cryptography involving pyca/cryptography has a vulnerable OpenSSL included in cryptography wheels under CWE-1395: Dependency on Vulnerable Third-Party Component.
Which Cryptography versions are affected?
Affected versions include releases prior to 43.0.1 across affected packages: cryptography.
What version fixes GHSA-h4gh-qq45-vh27?
Upgrading to 43.0.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is cryptography affected?
Yes, cryptography is affected in releases prior to 43.0.1. Upgrade your dependency to 43.0.1 or later.
What CWE is associated with GHSA-h4gh-qq45-vh27?
GHSA-h4gh-qq45-vh27 is classified under CWE-1395: Dependency on Vulnerable Third-Party Component (The product has a dependency on a third-party component that contains one or more known vulnerabilities.).
How can I check PyPI dependencies for GHSA-h4gh-qq45-vh27?
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-h4gh-qq45-vh27",
  "modified" : "2024-09-03T21:59:48Z",
  "published" : "2024-09-03T21:59:48Z",
  "aliases" : [ ],
  "summary" : "pyca/cryptography has a vulnerable OpenSSL included in cryptography wheels",
  "details" : "pyca/cryptography's wheels include a statically linked copy of OpenSSL. The versions of OpenSSL included in cryptography 37.0.0-43.0.0 are vulnerable to a security issue. More details about the vulnerability itself can be found in https://openssl-library.org/news/secadv/20240903.txt.\n\nIf you are building cryptography source (\"sdist\") then you are responsible for upgrading your copy of OpenSSL. Only users installing from wheels built by the cryptography project (i.e., those distributed on PyPI) need to update their cryptography versions.\n",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "cryptography"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "37.0.0"
      }, {
        "fixed" : "43.0.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/pyca/cryptography/security/advisories/GHSA-h4gh-qq45-vh27"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/pyca/cryptography"
  }, {
    "type" : "WEB",
    "url" : "https://openssl-library.org/news/secadv/20240903.txt"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-1395" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-09-03T21:59:48Z",
    "nvd_published_at" : null
  }
}