# CVE-2026-27459: pyOpenSSL DTLS cookie callback buffer overflow

> A buffer overflow in pyOpenSSL's DTLS cookie callback allows attackers to cause memory corruption or denial of service if custom callbacks return oversized cookies.

- **Severity:** High 7.2 (`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`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 17 Mar 2026
- **Updated:** 11 Sep 2026
- **Also known as:** AZL-80034, BELL-CVE-2026-27459, CLEANSTART-2026-HI15259, CLEANSTART-2026-ZF94018, DEBIAN-CVE-2026-27459, ECHO-913b-6868-0495, GHSA-5pwr-322w-8jr4, MINI-25hv-rvwp-679g, MINI-2qj9-4j2f-7928, MINI-98x6-5358-5hr9, MINI-f672-9c99-jx4f, MINI-h3qf-37p5-5xj4, MINI-h4wp-hjj2-rh3v, MINI-h6xh-mp3g-w2cq, MINI-hx5q-h4f6-5cq8, MINI-p2v6-cjwq-9qw3, MINI-q62c-xj6h-73gq, PYSEC-2026-2269, RHSA-2026:10754, ROOT-APP-PYPI-CVE-2026-27459, UBUNTU-CVE-2026-27459

## What is CVE-2026-27459?

CVE-2026-27459 is a high-severity memory corruption vulnerability in pyca pyopenssl, published on 17 Mar 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

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

Weakness: CWE-120 (Buffer Copy without Checking Size of Input)

## Which versions are affected by CVE-2026-27459?

3 open source packages ship an affected version, including pyopenssl. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `pyopenssl` | PyPI | From 22.0.0 | 26.0.0 |
| `pyopenssl` | PyPI | From 22.0.0 | 26.0.0 |
| `pyopenssl` | PyPI | From 22.0.0 | 26.0.0 |
| `python-pyOpenSSL` | Red Hat:rhui:4::el8 | All versions | 0:24.1.0-2.el8ui |
| `python3.11-pyOpenSSL` | Red Hat:rhui:4::el8 | All versions | 0:24.1.0-2.el8ui |

Products: Pyopenssl Pyopenssl.

## How do I fix CVE-2026-27459?

Upgrade pyopenssl to 26.0.0 or later.

## Is CVE-2026-27459 being exploited?

There is no known exploitation of CVE-2026-27459 in the wild and no public exploit code.

## Other vulnerabilities in pyca pyopenssl

- [CVE-2026-27448](https://insights.sbomify.com/CVE-2026-27448/): pyOpenSSL allows TLS connection bypass via unhandled callback exception in set_tlsext_servername_callback (low 1.7)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-27459 and fix it if it is affected.

What it is: CVE-2026-27459 is a high-severity memory corruption vulnerability in pyca pyopenssl, published on 17 Mar 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2026-27459 in the wild and no public exploit code.

Affected packages and fixed versions:
- pyopenssl (PyPI): affected from 22.0.0; fixed in 26.0.0
- pyopenssl (PyPI): affected from 22.0.0; fixed in 26.0.0
- pyopenssl (PyPI): affected from 22.0.0; fixed in 26.0.0

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-27459/ (Markdown: https://insights.sbomify.com/CVE-2026-27459/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-27459
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-27459
- OSV: https://osv.dev/vulnerability/CVE-2026-27459

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-27459/
Summaries are generated and may contain mistakes; the official description above is the record.
