CVE-2018-1000807: Pyopenssl PyOpenSSL Use-After-Free Vulnerability Vulnerability

HIGH
Advisory Identifier: GHSA-p28m-34f6-967q
CVSS 8.1
CWE-416
Published
Advisory Summary

CVE-2018-1000807 is a HIGH (CVSS 8.1) pyopenssl use-after-free vulnerability vulnerability (CWE-416: Use After Free) affecting Pyopenssl libraries in the PyPI ecosystem. The issue involves pyopenssl use-after-free vulnerability. Remediation is available by upgrading affected packages to version 17.5.0.

CVE-2018-1000807 at a Glance

CVE Identifier CVE-2018-1000807
GHSA Identifier GHSA-p28m-34f6-967q
Severity HIGH
CVSS v3.1 Base Score 8.1
CWE Classification CWE-416: Use After Free
Affected Product Pyopenssl
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 8.1

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2018-1000807

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: 17.5.0
pip install pyopenssl>=17.5.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-2018-1000807, 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 17.5.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-416: Use After Free, where the product reuses or references memory after it has been freed. at some point afterward, the memory may be allocated again and saved in another pointer, while the original pointer references a location somewhere within the new allocation. any operations using the original pointer are no longer valid because the memory "belongs" to the code that operates on the new pointer. 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

It was discovered that pyOpenSSL incorrectly handled memory when handling X509 objects. A remote attacker could use this issue to cause pyOpenSSL to crash, resulting in a denial of service, or possibly execute arbitrary code. This attack appears to be exploitable via Depends on the calling application and if it retains a reference to the memory. This vulnerability appears to have been fixed in 17.5.0.

CVE-2018-1000807 Affected Pyopenssl Versions

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

References

Frequently Asked Questions

What is CVE-2018-1000807?
CVE-2018-1000807 is a security vulnerability in Pyopenssl involving PyOpenSSL Use-After-Free vulnerability under CWE-416: Use After Free.
Which Pyopenssl versions are affected?
Affected versions include releases prior to 17.5.0 across affected packages: pyopenssl.
What version fixes CVE-2018-1000807?
Upgrading to 17.5.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is pyopenssl affected?
Yes, pyopenssl is affected in releases prior to 17.5.0. Upgrade your dependency to 17.5.0 or later.
What is the CVSS score of CVE-2018-1000807?
CVE-2018-1000807 has a CVSS v3.1 base score of 8.1 (HIGH) with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2018-1000807?
CVE-2018-1000807 is classified under CWE-416: Use After Free (The product reuses or references memory after it has been freed. At some point afterward, the memory may be allocated again and saved in another pointer, while the original pointer references a location somewhere within the new allocation. Any operations using the original pointer are no longer valid because the memory "belongs" to the code that operates on the new pointer.).
How can I check PyPI dependencies for CVE-2018-1000807?
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-p28m-34f6-967q",
  "modified" : "2024-10-15T16:03:16Z",
  "published" : "2018-10-10T16:10:38Z",
  "aliases" : [ "CVE-2018-1000807" ],
  "summary" : "PyOpenSSL Use-After-Free vulnerability",
  "details" : "It was discovered that pyOpenSSL incorrectly handled memory when handling X509 objects. A remote attacker could use this issue to cause pyOpenSSL to crash, resulting in a denial of service, or possibly execute arbitrary code. This attack appears to be exploitable via Depends on the calling application and if it retains a reference to the memory. This vulnerability appears to have been fixed in 17.5.0.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "pyopenssl"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "17.5.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2018-1000807"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pyca/pyopenssl/pull/723"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pyca/pyopenssl/commit/e73818600065821d588af475b024f4eb518c3509"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2019:0085"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/pyca/pyopenssl"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/pyopenssl/PYSEC-2018-23.yaml"
  }, {
    "type" : "WEB",
    "url" : "https://usn.ubuntu.com/3813-1"
  }, {
    "type" : "WEB",
    "url" : "http://lists.opensuse.org/opensuse-security-announce/2019-04/msg00014.html"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-416" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-06-16T21:47:43Z",
    "nvd_published_at" : "2018-10-08T15:29:00Z"
  }
}