CVE-2026-39892: Cryptography Cryptography Vulnerable To Buffer Overflow Vulnerability
MODERATECVE-2026-39892 is a MODERATE cryptography vulnerable to buffer overflow vulnerability (CWE-119: Improper Restriction of Operations within the Bounds of a Memory Buffer) affecting Cryptography libraries in the PyPI ecosystem. The issue involves cryptography vulnerable to buffer overflow if non-contiguous buffers were passed to apis. Remediation is available by upgrading affected packages to version 46.0.7.
CVE-2026-39892 at a Glance
How to Fix CVE-2026-39892
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>=46.0.7
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-2026-39892, 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 46.0.7), 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-119: Improper Restriction of Operations within the Bounds of a Memory Buffer, where the product performs operations on a memory buffer, but it reads from or writes to a memory location outside the buffer's intended boundary. this may result in read or write operations on unexpected memory locations that could be linked to other variables, data structures, or internal program data. 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-2026-39892 Affected Cryptography Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
cryptography
|
PyPI |
≥ 45.0.0
< 46.0.7
|
46.0.7
|
References
Frequently Asked Questions
What is CVE-2026-39892?
Which Cryptography versions are affected?
What version fixes CVE-2026-39892?
Is cryptography affected?
What CWE is associated with CVE-2026-39892?
How can I check PyPI dependencies for CVE-2026-39892?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-p423-j2cm-9vmq",
"modified" : "2026-06-05T17:52:21Z",
"published" : "2026-04-08T19:23:08Z",
"aliases" : [ "CVE-2026-39892" ],
"summary" : "Cryptography vulnerable to buffer overflow if non-contiguous buffers were passed to APIs",
"details" : "If a non-contiguous buffer was passed to APIs which accepted Python buffers (e.g. `Hash.update()`), this could lead to buffer overflows. For example:\n\n```python\nh = Hash(SHA256())\nb.update(buf[::-1])\n```\n\nwould read past the end of the buffer on Python >3.11",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "cryptography"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "45.0.0"
}, {
"fixed" : "46.0.7"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/pyca/cryptography/security/advisories/GHSA-p423-j2cm-9vmq"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-39892"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/pyca/cryptography"
}, {
"type" : "WEB",
"url" : "https://github.com/pypa/advisory-database/tree/main/vulns/cryptography/PYSEC-2026-36.yaml"
}, {
"type" : "WEB",
"url" : "http://www.openwall.com/lists/oss-security/2026/04/08/12"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-119" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-04-08T19:23:08Z",
"nvd_published_at" : "2026-04-08T21:17:01Z"
}
}