Junglewise Threat Intelligence

CVE-2026-27459: pyOpenSSL buffer overflow in DTLS cookie generation callback

CVE-2026-27459 · Severity: critical · CVSS 9.8 · Published 2026-03-18

Vendors: PyPI.

Executive brief

pyOpenSSL is a widely used Python library that provides secure communication capabilities for applications. A flaw in how it handles certain security callbacks could allow an attacker to cause a memory overflow, potentially leading to application crashes or unauthorized code execution. This affects services using DTLS (Datagram Transport Layer Security) that implement specific cookie generation routines.

Technical details

A buffer overflow vulnerability (CWE-120) exists in pyOpenSSL versions 22.0.0 through 25.3.0. The issue occurs when a user-provided callback to `set_cookie_generate_callback` returns a cookie value greater than 256 bytes (DTLS1_COOKIE_LENGTH). pyOpenSSL fails to validate the length of this return value before copying it into a fixed-size native buffer provided by the underlying OpenSSL library. An attacker can exploit this to corrupt adjacent memory, potentially leading to remote code execution or a denial-of-service condition. The vulnerability is patched in version 26.0.0, which now rejects overly long cookie values.

Affected products

  • pyca pyOpenSSL >=22.0.0, <26.0.0

Timeline

  • 2026-03-15: patched: Version 26.0.0 released with fix
  • 2026-03-15: advisory: GitHub Security Advisory GHSA-5pwr-322w-8jr4 published
  • 2026-03-18: disclosed: CVE-2026-27459 published to NVD

References

Related threats