# CVE-2026-39892: cryptography has a buffer overflow if non-contiguous buffers were passed to APIs

> Attackers can trigger buffer overflows in the Python cryptography library by passing non-contiguous buffers to APIs, potentially leading to code execution or crashes.

- **Severity:** Medium 6.9 (`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`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 8 Apr 2026
- **Updated:** 10 Sep 2026
- **Also known as:** ALPINE-CVE-2026-39892, BELL-CVE-2026-39892, CLEANSTART-2026-HA56208, CLEANSTART-2026-TY96751, CLSA-2026-1778028237, DEBIAN-CVE-2026-39892, ECHO-0a60-183d-a61b, GHSA-p423-j2cm-9vmq, MINI-48mw-84m4-mj38, MINI-49c3-26hx-838f, MINI-85qm-27f2-fx26, MINI-89rm-vhw7-9rgw, MINI-gx47-x28g-h7gw, MINI-jr38-pqp9-5c6r, MINI-p9f2-5vrj-h6xg, MINI-pvhg-wrh8-6c9m, MINI-qv8f-2wcf-75cg, MINI-rw4r-jmx7-9f66, MINI-v49p-r2xv-hc22, MINI-wm23-4f6g-h5pm, MINI-wxcw-5g46-424c, PYSEC-2026-36, ROOT-APP-PYPI-CVE-2026-39892, openSUSE-SU-2026:10535-1

## What is CVE-2026-39892?

CVE-2026-39892 is a medium-severity memory corruption vulnerability in pyca cryptography, published on 8 Apr 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

cryptography is a package designed to expose cryptographic primitives and recipes to Python developers. From 45.0.0 to before 46.0.7, if a non-contiguous buffer was passed to APIs which accepted Python buffers (e.g. Hash.update()), this could lead to buffer overflows. This vulnerability is fixed in 46.0.7.

Weakness: CWE-131 (Incorrect Calculation of Buffer Size), CWE-119 (Improper Restriction of Operations within the Bounds of a Memory Buffer)

## Which versions are affected by CVE-2026-39892?

3 open source packages ship an affected version, including cryptography. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `cryptography` | PyPI | From 45.0.0 | 46.0.7 |
| `cryptography` | PyPI | From 45.0.0 | 46.0.7 |
| `cryptography` | PyPI | From 45.0.0 | 46.0.7 |
| `python-cryptography` | openSUSE:Tumbleweed | All versions | 46.0.7-1.1 |

Products: Cryptography.io Cryptography.

## How do I fix CVE-2026-39892?

Upgrade cryptography to 46.0.7 or later.

## Is CVE-2026-39892 being exploited?

There is no known exploitation of CVE-2026-39892 in the wild and no public exploit code.

## Other vulnerabilities in pyca cryptography

- [CVE-2020-36242](https://insights.sbomify.com/CVE-2020-36242/): PyCA Cryptography symmetrically encrypting large values can lead to integer overflow (critical 9.1)
- [CVE-2026-26007](https://insights.sbomify.com/CVE-2026-26007/): cryptography Subgroup Attack Due to Missing Subgroup Validation for SECT Curves (high 8.2)
- [CVE-2024-26130](https://insights.sbomify.com/CVE-2024-26130/): cryptography NULL pointer dereference with pkcs12.serialize_key_and_certificates when called with a non-matching certificate and private key and an hmac_hash override (high 7.5)
- [CVE-2023-38325](https://insights.sbomify.com/CVE-2023-38325/): cryptography mishandles SSH certificates (high 7.5)
- [CVE-2023-49083](https://insights.sbomify.com/CVE-2023-49083/): cryptography vulnerable to NULL-dereference when loading PKCS7 certificates (medium 5.9)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-39892 and fix it if it is affected.

What it is: CVE-2026-39892 is a medium-severity memory corruption vulnerability in pyca cryptography, published on 8 Apr 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2026-39892 in the wild and no public exploit code.

Affected packages and fixed versions:
- cryptography (PyPI): affected from 45.0.0; fixed in 46.0.7
- cryptography (PyPI): affected from 45.0.0; fixed in 46.0.7
- cryptography (PyPI): affected from 45.0.0; fixed in 46.0.7

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-39892/ (Markdown: https://insights.sbomify.com/CVE-2026-39892/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-39892
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-39892
- OSV: https://osv.dev/vulnerability/CVE-2026-39892

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-39892/
Summaries are generated and may contain mistakes; the official description above is the record.
