CVE-2026-27459: CWE-120: Buffer Copy without Checking Size of Input ('Classic Buffer Overflow') in pyca pyopenssl
pyOpenSSL is a Python wrapper around the OpenSSL library. Starting in version 22.0.0 and prior to version 26.0.0, if a user provided callback to `set_cookie_generate_callback` returned a cookie value greater than 256 bytes, pyOpenSSL would overflow an OpenSSL provided buffer. Starting in version 26.0.0, cookie values that are too long are now rejected.
AI Analysis
Technical Summary
pyOpenSSL is a Python wrapper for OpenSSL. In versions >=22.0.0 and <26.0.0, the set_cookie_generate_callback function can trigger a buffer overflow if the callback returns a cookie string or byte sequence longer than 256 bytes. This occurs due to missing bounds checking before copying data into a fixed-size buffer provided by OpenSSL. The issue is exploitable only when an application uses a custom callback that returns an oversized cookie. Starting in version 26.0.0, pyOpenSSL enforces a limit on cookie length, rejecting values over 256 bytes to prevent overflow. The vulnerability is classified as CWE-120 (Classic Buffer Overflow) and can lead to memory modification, potential code execution, or denial of service.
Potential Impact
The vulnerability can cause a buffer overflow in the OpenSSL buffer, potentially allowing an attacker to modify memory, execute unauthorized code or commands, or cause denial of service through crashes or resource exhaustion. However, exploitation requires a custom callback returning a cookie longer than 256 bytes, which limits the attack surface. There are no known exploits in the wild. The impact affects confidentiality, integrity, and availability.
Mitigation Recommendations
A fix is available starting with pyOpenSSL version 26.0.0, which rejects cookie values longer than 256 bytes. Users should upgrade to version 26.0.0 or later. If upgrading is not immediately possible, ensure that any callback provided to set_cookie_generate_callback strictly limits cookie length to under 256 bytes to mitigate the vulnerability.
CVE-2026-27459: CWE-120: Buffer Copy without Checking Size of Input ('Classic Buffer Overflow') in pyca pyopenssl
Description
pyOpenSSL is a Python wrapper around the OpenSSL library. Starting in version 22.0.0 and prior to version 26.0.0, if a user provided callback to `set_cookie_generate_callback` returned a cookie value greater than 256 bytes, pyOpenSSL would overflow an OpenSSL provided buffer. Starting in version 26.0.0, cookie values that are too long are now rejected.
CVSS v4.0
Score 7.2high
Affected software
pyca
pyopenssl
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
pyOpenSSL is a Python wrapper for OpenSSL. In versions >=22.0.0 and <26.0.0, the set_cookie_generate_callback function can trigger a buffer overflow if the callback returns a cookie string or byte sequence longer than 256 bytes. This occurs due to missing bounds checking before copying data into a fixed-size buffer provided by OpenSSL. The issue is exploitable only when an application uses a custom callback that returns an oversized cookie. Starting in version 26.0.0, pyOpenSSL enforces a limit on cookie length, rejecting values over 256 bytes to prevent overflow. The vulnerability is classified as CWE-120 (Classic Buffer Overflow) and can lead to memory modification, potential code execution, or denial of service.
Potential Impact
The vulnerability can cause a buffer overflow in the OpenSSL buffer, potentially allowing an attacker to modify memory, execute unauthorized code or commands, or cause denial of service through crashes or resource exhaustion. However, exploitation requires a custom callback returning a cookie longer than 256 bytes, which limits the attack surface. There are no known exploits in the wild. The impact affects confidentiality, integrity, and availability.
Mitigation Recommendations
A fix is available starting with pyOpenSSL version 26.0.0, which rejects cookie values longer than 256 bytes. Users should upgrade to version 26.0.0 or later. If upgrading is not immediately possible, ensure that any callback provided to set_cookie_generate_callback strictly limits cookie length to under 256 bytes to mitigate the vulnerability.
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
- Vendor Advisory Urls
- [{"url":"https://access.redhat.com/security/cve/CVE-2026-27459","vendor":"Red Hat"},{"url":"https://access.redhat.com/errata/RHSA-2026:13512","vendor":"Red Hat"},{"url":"https://access.redhat.com/errata/RHSA-2026:10754","vendor":"Red Hat"},{"url":"https://access.redhat.com/errata/RHSA-2026:14874","vendor":"Red Hat"},{"url":"https://access.redhat.com/errata/RHSA-2026:13508","vendor":"Red Hat"},{"url":"https://access.redhat.com/errata/RHSA-2026:14873","vendor":"Red Hat"},{"url":"https://access.redhat.com/errata/RHSA-2026:14835","vendor":"Red Hat"},{"url":"https://access.redhat.com/errata/RHSA-2026:13553","vendor":"Red Hat"},{"url":"https://access.redhat.com/errata/RHSA-2026:13545","vendor":"Red Hat"},{"url":"https://access.redhat.com/errata/RHSA-2026:7224","vendor":"Red Hat"},{"url":"https://access.redhat.com/errata/RHSA-2026:11856","vendor":"Red Hat"},{"url":"https://access.redhat.com/errata/RHSA-2026:21017","vendor":"Red Hat"},{"url":"https://access.redhat.com/errata/RHSA-2026:24853","vendor":"Red Hat"},{"url":"https://access.redhat.com/errata/RHSA-2026:19375","vendor":"Red Hat"},{"url":"https://access.redhat.com/errata/RHSA-2026:22465","vendor":"Red Hat"},{"url":"https://access.redhat.com/errata/RHSA-2026:11916","vendor":"Red Hat"},{"url":"https://access.redhat.com/errata/RHSA-2026:11996","vendor":"Red Hat"},{"url":"https://access.redhat.com/errata/RHSA-2026:8437","vendor":"Red Hat"}]
Threat ID: 69b9e71a771bdb1749eb4c6c
Added to database: 03/17/2026, 23:43:22 UTC
Last enriched: 08/14/2026, 14:41:09 UTC
Last updated: 09/12/2026, 10:01:30 UTC
Views: 940
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
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
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.