Vulnerabilities in pkg:pypi/pyopenssl

PACKAGE
Advisory Identifier: GHSA-5pwr-322w-8jr4
Advisory Summary

CVE-2026-27459 is a HIGH pyopenssl dtls cookie callback buffer vulnerability (CWE-120: Buffer Copy without Checking Size of Input ('Classic Buffer Overflow')) affecting Pyopenssl libraries in the PyPI ecosystem. The issue involves pyopenssl dtls cookie callback buffer overflow. Remediation is available by upgrading affected packages to version 26.0.0.

4 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:pypi/pyopenssl

4 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:pypi/pyopenssl. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-5pwr-322w-8jr4 CVE-2026-27459 HIGH pyOpenSSL DTLS cookie callback buffer overflow
GHSA-vp96-hxj8-p424 CVE-2026-27448 LOW pyOpenSSL allows TLS connection bypass via unhandled callback exception in set_tlsext_servername_callback
GHSA-2rcm-phc9-3945 CVE-2018-1000808 HIGH Pyopenssl Incorrect Memory Management
GHSA-p28m-34f6-967q CVE-2018-1000807 HIGH PyOpenSSL Use-After-Free vulnerability

CVE-2026-27459 at a Glance

CVE Identifier CVE-2026-27459
GHSA Identifier GHSA-5pwr-322w-8jr4
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-120: Buffer Copy without Checking Size of Input ('Classic Buffer Overflow')
Affected Product Pyopenssl
Package Ecosystem PyPI
Published Date
Last Updated

How to Fix CVE-2026-27459

To remediate this vulnerability, upgrade all affected Pyopenssl dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

pyopenssl fixed: 26.0.0
pip install pyopenssl>=26.0.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show pyopenssl

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2026-27459, inspect your installed packages using pip:

pip show pyopenssl

Analyze the terminal output to locate any version of Pyopenssl in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 26.0.0), your application is affected.

Note: The pip show pyopenssl command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-120: Buffer Copy without Checking Size of Input ('Classic Buffer Overflow'), where the product copies an input buffer to an output buffer without verifying that the size of the input buffer is less than the size of the output buffer. In Pyopenssl, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

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. Cookie values that are too long are now rejected.

CVE-2026-27459 Affected Pyopenssl Versions

1 component(s)
Fixed Versions:
26.0.0
Product / Package Ecosystem Affected Versions Fixed Version
pyopenssl
PyPI
≥ 22.0.0
< 26.0.0
26.0.0

References

Frequently Asked Questions

What is CVE-2026-27459?
CVE-2026-27459 is a security vulnerability in Pyopenssl involving pyOpenSSL DTLS cookie callback buffer overflow under CWE-120: Buffer Copy without Checking Size of Input ('Classic Buffer Overflow').
Which Pyopenssl versions are affected?
Affected versions include releases prior to 26.0.0 across affected packages: pyopenssl.
What version fixes CVE-2026-27459?
Upgrading to 26.0.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is pyopenssl affected?
Yes, pyopenssl is affected in releases prior to 26.0.0. Upgrade your dependency to 26.0.0 or later.
What CWE is associated with CVE-2026-27459?
CVE-2026-27459 is classified under CWE-120: Buffer Copy without Checking Size of Input ('Classic Buffer Overflow') (The product copies an input buffer to an output buffer without verifying that the size of the input buffer is less than the size of the output buffer.).
How can I check PyPI dependencies for CVE-2026-27459?
Run the dependency tree command: 'pip show pyopenssl'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-5pwr-322w-8jr4",
  "modified" : "2026-03-19T18:28:11Z",
  "published" : "2026-03-16T16:22:29Z",
  "aliases" : [ "CVE-2026-27459" ],
  "summary" : "pyOpenSSL DTLS cookie callback buffer overflow",
  "details" : "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.\n\nCookie values that are too long are now rejected.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "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" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "pyopenssl"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "22.0.0"
      }, {
        "fixed" : "26.0.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/pyca/pyopenssl/security/advisories/GHSA-5pwr-322w-8jr4"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-27459"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pyca/pyopenssl/commit/57f09bb4bb051d3bc2a1abd36e9525313d5cd408"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/pyca/pyopenssl"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pyca/pyopenssl/blob/358cbf29c4e364c59930e53a270116249581eaa3/CHANGELOG.rst"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-120" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-03-16T16:22:29Z",
    "nvd_published_at" : "2026-03-18T00:16:19Z"
  }
}