CVE-2026-27459: pyOpenSSL Buffer Overflow Vulnerability in DTLS Cookie Callback

pyopenssl Updated 16 Mar 2026

Summary

16/03/2026
Yes i
High
7.2

CVE-2026-27459: pyOpenSSL DTLS cookie callback buffer overflow. Affects pyopenssl versions >= 22.0.0, < 26.0.0. Fixed in 26.0.0. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

pyOpenSSL is a Python library that provides a high-level interface to OpenSSL, enabling developers to implement secure communication protocols. It supports various cryptographic operations and is widely used in applications requiring SSL/TLS functionalities. However, a recent vulnerability has been identified in the DTLS cookie callback mechanism, which can lead to severe security risks if exploited.

Vulnerability Detail

The vulnerability arises from a buffer overflow condition when a user-defined callback function for generating DTLS cookies returns a value exceeding 256 bytes. This overflow can lead to memory corruption, potentially allowing an attacker to execute arbitrary code or crash the application. The issue is rooted in the handling of cookie values, which were not adequately validated before being processed, exposing the application to significant security threats.

How To Fix

Minimum fixed version

26.0.0

This is the first release that contains the fix.

pip install --upgrade "pyopenssl==26.0.0"

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, developers can implement a validation check in their callback function to ensure that the cookie value does not exceed 256 bytes. For example:

def my_cookie_callback():
    cookie_value = generate_cookie()
    if len(cookie_value) > 256:
        raise ValueError('Cookie value exceeds maximum length')
    return cookie_value

Conclusion

The buffer overflow vulnerability identified as CVE-2026-27459 in the pyOpenSSL library poses significant risks to applications using this library for DTLS cookie generation. It is crucial to update to the patched version 26.0.0 or later to mitigate these risks effectively.

See every vulnerability recorded for pyopenssl →

Share this vulnerability

FAQ

CVE-2026-27459 is a vulnerability in the pyOpenSSL library that can lead to a buffer overflow due to improper handling of DTLS cookie values.

If your application uses pyOpenSSL and allows user-defined cookie generation, it may be susceptible to this buffer overflow, leading to potential security breaches.

The CVSS score for this vulnerability is 7.2, indicating a high severity level.

You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.

If an immediate update is not possible, implement a validation check in your cookie generation callback to ensure cookie values do not exceed 256 bytes.

Related vulnerabilities

Recent vulnerabilities recorded for pyopenssl.

How To Fix

Minimum fixed version

26.0.0

This is the first release that contains the fix.

pip install --upgrade "pyopenssl==26.0.0"

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback