GHSA-h4gh-qq45-vh27: Cryptography Pyca/cryptography Has A Vulnerable OpenSSL Vulnerability
MODERATEGHSA-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
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.
pip install cryptography>=43.0.1
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
GHSA-h4gh-qq45-vh27 Affected Cryptography Versions
1 component(s)| 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?
Which Cryptography versions are affected?
What version fixes GHSA-h4gh-qq45-vh27?
Is cryptography affected?
What CWE is associated with GHSA-h4gh-qq45-vh27?
How can I check PyPI dependencies for GHSA-h4gh-qq45-vh27?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"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
}
}