GitHub Advisoryadvisory · PyPI

GHSA-p423-j2cm-9vmq Cryptography vulnerable to buffer overflow if non-contiguous buffers were passed to APIs

MEDIUM Published 2026-04-08 Modified 2026-06-05 Official page ↗
Aliases
CVE-2026-39892
Ecosystem
PyPI
Packages
cryptography
Severity
Moderate
CVSS vector
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
Weaknesses
CWE-119
Reviewed
2026-04-08

Affected packages

• PyPI cryptography: >= 45.0.0, < 46.0.7 → fixed in 46.0.7

Description

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: ```python h = Hash(SHA256()) b.update(buf[::-1]) ``` would read past the end of the buffer on Python >3.11

Related

Alias · CVE (1)

  • CVE-2026-39892 cryptography is a package designed to expose cryptographic primitives and recipes to Python developers. vulnerability

Weakness · CWE (1)

  • CWE-119 Improper Restriction of Operations within the Bounds of a Memory Buffer weakness

References