Skip to main content
EPSS 0.7%top 49%

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: 03/17/2026 (03/17/2026, 23:34:28 UTC)
Source: CVE Database V5
Vendor/Project: pyca
Product: 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

Attack Vector
Network
Attack Complexity
High
Attack Requirements
Present
Privileges Required
None
User Interaction
None
Vuln. Confidentiality
High
Vuln. Integrity
High
Vuln. Availability
High
Subsq. Confidentiality
None
Subsq. Integrity
None
Subsq. Availability
None
CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:U

Affected software

pyca

pyopenssl

Affected versions
>=22.0.0 <26.0.0
pyopenssl
pkg:pypi/pyopenssl
Affected versions
<26.0.0 >=22.0.0

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 08/14/2026, 14:41:09 UTC

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.

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

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