CVE-2026-27459·Python vulnerability
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.
- Severity
- critical
- Software
- Python
- Fixed in
- 26.0.0
- Published
- 2026-03-18
Affected versions
From: 22.0.0
Until: 26.0.0
Fixed in: 26.0.0
How to fix this CVE
Update pyOpenSSL to version 26.0.0 or later to patch a critical buffer overflow vulnerability in cookie handling. Applications using custom cookie generation callbacks must ensure they validate cookie length before returning values. Immediately apply security updates to all Python environments where pyOpenSSL version 22.0.0–25.x is installed.
sudo dnf update python3-pyOpenSSLDefensia detects this vulnerability
How to check if you are affected
- Check installed pyOpenSSL version: python3 -c "import OpenSSL; print(OpenSSL.__version__)"
- List all Python packages with version info: pip3 list | grep -i openssl or python3 -m pip show pyOpenSSL
- Identify applications using set_cookie_generate_callback: grep -r "set_cookie_generate_callback" /path/to/application --include="*.py"
- Verify patched version is installed: python3 -c "import OpenSSL; assert OpenSSL.__version__ >= '26.0.0', 'Vulnerable version detected'" && echo "Patched"
FAQ
What is CVE-2026-27459?
CVE-2026-27459 is a critical buffer overflow vulnerability in pyOpenSSL versions 22.0.0 through 25.x where oversized cookie values (>256 bytes) generated by custom callback functions cause memory corruption. Version 26.0.0 implements strict validation to reject excessively long cookies.
Is CVE-2026-27459 being actively exploited?
No, this vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog and no public exploits are currently available.
What versions of Python are affected by CVE-2026-27459?
The vulnerability affects pyOpenSSL versions 22.0.0 through 25.x. Python itself is not affected; the vulnerability is in the pyOpenSSL wrapper library.
How do I check if my server is vulnerable to CVE-2026-27459?
Run 'python3 -c "import OpenSSL; print(OpenSSL.__version__)"' and compare against version 26.0.0. Any version from 22.0.0–25.x that implements set_cookie_generate_callback is vulnerable.
Does Defensia detect CVE-2026-27459?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If pyOpenSSL is installed on a monitored server, CVE-2026-27459 will appear in your dashboard with remediation steps.
Related Python CVEs
References
- https://github.com/pyca/pyopenssl/blob/358cbf29c4e364c59930e53a270116249581eaa3/CHANGELOG.rst
- https://github.com/pyca/pyopenssl/commit/57f09bb4bb051d3bc2a1abd36e9525313d5cd408
- https://github.com/pyca/pyopenssl/security/advisories/GHSA-5pwr-322w-8jr4
- https://access.redhat.com/errata/RHSA-2026:10754
- https://access.redhat.com/errata/RHSA-2026:11856
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2026-27459. Free for 1 server.
Get started free