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. The flaw 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 classic buffer overflow (CWE-120) can lead to memory corruption, potentially allowing remote code execution or denial of service. The vulnerability requires no authentication or user interaction but has a high attack complexity. It affects Python applications using pyOpenSSL in the specified versions. The issue was fixed in pyOpenSSL 26.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 03/25/2026, 01:02:31 UTC

Technical Analysis

CVE-2026-27459 is a buffer overflow vulnerability in the pyOpenSSL library, a Python wrapper around OpenSSL. The vulnerability arises from improper validation of the size of cookie values returned by user-defined callbacks registered via set_cookie_generate_callback. Specifically, if the callback returns a cookie value larger than 256 bytes, pyOpenSSL copies this data into an OpenSSL buffer without checking the size, leading to a classic buffer overflow (CWE-120). This can corrupt memory, potentially allowing attackers to execute arbitrary code or cause application crashes. The flaw affects pyOpenSSL versions from 22.0.0 up to but excluding 26.0.0. The vulnerability does not require authentication or user interaction but has a high attack complexity, meaning exploitation is possible but may require specific conditions or knowledge. The issue was addressed in version 26.0.0 by rejecting cookie values that exceed the 256-byte limit, preventing the overflow. Although no exploits have been reported in the wild, the vulnerability poses a significant risk to applications relying on pyOpenSSL for TLS/SSL operations, especially those that implement custom cookie generation logic. The CVSS 4.0 base score is 7.2, reflecting high severity due to the potential impact on confidentiality, integrity, and availability of affected systems.

Potential Impact

The vulnerability could allow remote attackers to cause memory corruption in applications using vulnerable pyOpenSSL versions, potentially leading to remote code execution or denial of service. This can compromise the confidentiality, integrity, and availability of systems relying on pyOpenSSL for secure communications. Exploitation could enable attackers to bypass security controls, execute arbitrary code with the privileges of the affected application, or crash services, resulting in downtime. Organizations running Python applications that handle TLS/SSL connections and use custom cookie generation callbacks are at particular risk. The high attack complexity reduces the likelihood of widespread automated exploitation, but targeted attacks against critical infrastructure or sensitive applications remain a concern. The absence of known exploits in the wild provides some temporary relief, but the vulnerability should be treated as urgent due to the potential severity of impact.

Mitigation Recommendations

1. Upgrade pyOpenSSL to version 26.0.0 or later, where the vulnerability is fixed by rejecting cookie values exceeding 256 bytes. 2. Review and audit any custom cookie generation callbacks used with set_cookie_generate_callback to ensure they do not produce excessively large cookie values. 3. Implement input validation and size checks on cookie values before they are returned by callbacks to prevent buffer overflow conditions. 4. Employ runtime protections such as Address Space Layout Randomization (ASLR) and Data Execution Prevention (DEP) to mitigate exploitation impact. 5. Monitor application logs and network traffic for unusual behavior or crashes that could indicate attempted exploitation. 6. Conduct code reviews and penetration testing focusing on TLS/SSL handling and custom callback implementations. 7. If immediate upgrade is not possible, consider disabling or restricting the use of set_cookie_generate_callback functionality temporarily to reduce exposure.

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/25/2026, 1:02:31 AM

Last updated: 4/28/2026, 5:43:30 PM

Views: 784

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 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