CVE-2023-50782: Cryptography Python Cryptography Package Vulnerable To Vulnerability
HIGHCVE-2023-50782 is a HIGH (CVSS 7.5) python cryptography package vulnerable to vulnerability (CWE-203: Observable Discrepancy) affecting Cryptography libraries in the PyPI ecosystem. The issue involves python cryptography package vulnerable to bleichenbacher timing oracle attack. Remediation is available by upgrading affected packages to version 42.0.0.
CVE-2023-50782 at a Glance
Security Impact
CVSS: 7.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N).
How to Fix CVE-2023-50782
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>=42.0.0
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-2023-50782, 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 42.0.0), 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-203: Observable Discrepancy, where the product behaves differently or sends different responses under different circumstances in a way that is observable to an unauthorized actor. 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
CVE-2023-50782 Affected Cryptography Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
cryptography
|
PyPI |
< 42.0.0
|
42.0.0
|
References
Frequently Asked Questions
What is CVE-2023-50782?
Which Cryptography versions are affected?
What version fixes CVE-2023-50782?
Is cryptography affected?
What is the CVSS score of CVE-2023-50782?
What CWE is associated with CVE-2023-50782?
How can I check PyPI dependencies for CVE-2023-50782?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-3ww4-gg4f-jr7f",
"modified" : "2026-02-27T20:57:35Z",
"published" : "2024-02-05T21:30:31Z",
"aliases" : [ "CVE-2023-50782" ],
"summary" : "Python Cryptography package vulnerable to Bleichenbacher timing oracle attack",
"details" : "A flaw was found in the python-cryptography package. This issue may allow a remote attacker to decrypt captured messages in TLS servers that use RSA key exchanges, which may lead to exposure of confidential or sensitive data.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N"
}, {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/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" : "42.0.0"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-50782"
}, {
"type" : "WEB",
"url" : "https://github.com/pyca/cryptography/issues/9785"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/security/cve/CVE-2023-50782"
}, {
"type" : "WEB",
"url" : "https://bugzilla.redhat.com/show_bug.cgi?id=2254432"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/pyca/cryptography"
}, {
"type" : "WEB",
"url" : "https://www.couchbase.com/alerts"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-203", "CWE-208", "CWE-385" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2024-02-05T23:04:50Z",
"nvd_published_at" : "2024-02-05T21:15:11Z"
}
}