Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2026-27459: CWE-120: Buffer Copy without Checking Size of Input ('Classic Buffer Overflow') in pyca pyopenssl

0
High
VulnerabilityCVE-2026-27459cvecve-2026-27459cwe-120
Published: Tue Mar 17 2026 (03/17/2026, 23:34:28 UTC)
Source: CVE Database V5
Vendor/Project: pyca
Product: pyopenssl

Description

CVE-2026-27459 is a high-severity buffer overflow vulnerability in pyOpenSSL versions 22. 0. 0 up to but not including 26. 0. 0. It occurs when a user-provided callback to set_cookie_generate_callback returns a cookie value exceeding 256 bytes, causing an overflow of an OpenSSL buffer. This vulnerability can lead to memory corruption, potentially allowing remote code execution or denial of service without requiring authentication or user interaction. The issue was fixed in pyOpenSSL 26. 0. 0 by rejecting overly long cookie values.

AI-Powered Analysis

AILast updated: 03/17/2026, 23:57:38 UTC

Technical Analysis

CVE-2026-27459 is a classic buffer overflow vulnerability (CWE-120) identified in the pyOpenSSL library, a Python wrapper around OpenSSL. The flaw exists in versions starting from 22.0.0 up to but not including 26.0.0. Specifically, when a user-supplied callback function registered via set_cookie_generate_callback returns a cookie value longer than 256 bytes, pyOpenSSL fails to properly check the size before copying it into an OpenSSL-managed buffer. This unchecked copy leads to a buffer overflow, which can corrupt adjacent memory. Such memory corruption can be exploited to execute arbitrary code, crash the application, or cause other unpredictable behavior. The vulnerability does not require prior authentication or user interaction, increasing its risk profile. The CVSS 4.0 base score is 7.2, reflecting high severity, with network attack vector, high impact on confidentiality, integrity, and availability, and requiring high attack complexity and partial privileges. The issue was addressed in pyOpenSSL 26.0.0 by adding input validation that rejects cookie values exceeding the 256-byte limit, preventing overflow. No public exploits have been reported yet, but the vulnerability's nature and impact warrant immediate attention from users of affected versions.

Potential Impact

The buffer overflow in pyOpenSSL can have severe consequences for organizations relying on Python applications that use this library for SSL/TLS operations. Exploitation could allow attackers to execute arbitrary code remotely, potentially leading to full system compromise, data breaches, or persistent malware installation. Even if code execution is not achieved, the vulnerability can cause denial of service by crashing applications or services, disrupting business operations. Since pyOpenSSL is widely used in web servers, APIs, and other network-facing services, the vulnerability poses a significant risk to confidentiality, integrity, and availability of critical systems. The lack of authentication or user interaction requirements means attackers can exploit this remotely without prior access, increasing the threat surface. Organizations with automated or custom cookie generation callbacks in pyOpenSSL are particularly at risk. The absence of known exploits in the wild currently reduces immediate risk but does not eliminate the potential for future attacks, especially as the vulnerability is publicly disclosed.

Mitigation Recommendations

The primary mitigation is to upgrade all pyOpenSSL installations to version 26.0.0 or later, where the vulnerability is fixed by rejecting cookie values longer than 256 bytes. Organizations should audit their codebases to identify any use of set_cookie_generate_callback and verify that callbacks do not produce excessively long cookie values. If upgrading immediately is not feasible, applying strict input validation on cookie values within the callback functions can reduce risk. Additionally, monitoring application logs for abnormal crashes or memory errors related to pyOpenSSL can help detect exploitation attempts. Employing runtime protections such as Address Space Layout Randomization (ASLR) and Data Execution Prevention (DEP) can also mitigate exploitation impact. Finally, organizations should maintain up-to-date threat intelligence to respond promptly if exploits emerge in the wild.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
GitHub_M
Date Reserved
2026-02-19T17:25:31.100Z
Cvss Version
4.0
State
PUBLISHED

Threat ID: 69b9e71a771bdb1749eb4c6c

Added to database: 3/17/2026, 11:43:22 PM

Last enriched: 3/17/2026, 11:57:38 PM

Last updated: 3/18/2026, 4:39:35 AM

Views: 34

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console in Console -> Billing for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses