CVE-2023-50781: M2crypto M2crypto Bleichenbacher Timing Attack - Vulnerability
MODERATECVE-2023-50781 is a MODERATE (CVSS 5.9) m2crypto bleichenbacher timing attack - vulnerability (CWE-203: Observable Discrepancy) affecting M2crypto libraries in the PyPI ecosystem. The issue involves m2crypto bleichenbacher timing attack - incomplete fix for cve-2020-25657. Remediation is available in the latest vendor maintenance releases.
CVE-2023-50781 at a Glance
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).
How to Fix CVE-2023-50781
To remediate this vulnerability, upgrade all affected M2crypto 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 m2crypto>=Latest secure release
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show m2crypto
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2023-50781, inspect your installed packages using pip:
pip show m2crypto
Analyze the terminal output to locate any version of M2crypto in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), your application is affected.
Note: The pip show m2crypto 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 M2crypto, 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-50781 Affected M2crypto Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
m2crypto
|
PyPI |
≤ 0.40.1
|
|
References
Frequently Asked Questions
What is CVE-2023-50781?
Which M2crypto versions are affected?
What version fixes CVE-2023-50781?
Is m2crypto affected?
What is the CVSS score of CVE-2023-50781?
What CWE is associated with CVE-2023-50781?
How can I check PyPI dependencies for CVE-2023-50781?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-944j-8ch6-rf6x",
"modified" : "2026-02-27T20:57:08Z",
"published" : "2024-02-05T21:30:31Z",
"aliases" : [ "CVE-2023-50781" ],
"summary" : "m2crypto Bleichenbacher timing attack - incomplete fix for CVE-2020-25657",
"details" : "A flaw was found in m2crypto. 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:H/PR:N/UI:N/S:U/C:H/I:N/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "m2crypto"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"last_affected" : "0.40.1"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-50781"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/security/cve/CVE-2023-50781"
}, {
"type" : "WEB",
"url" : "https://bugzilla.redhat.com/show_bug.cgi?id=2254426"
}, {
"type" : "PACKAGE",
"url" : "https://gitlab.com/m2crypto/m2crypto"
}, {
"type" : "WEB",
"url" : "https://gitlab.com/m2crypto/m2crypto/-/issues/342"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-203", "CWE-208", "CWE-385" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2024-02-05T22:41:57Z",
"nvd_published_at" : "2024-02-05T21:15:10Z"
}
}