CVE-2018-1000808: Pyopenssl Pyopenssl Incorrect Memory Management Vulnerability

HIGH
Advisory Identifier: GHSA-2rcm-phc9-3945
CVSS 5.9
CWE-404 CWE-401
Published
Advisory Summary

CVE-2018-1000808 is a HIGH (CVSS 5.9) pyopenssl incorrect memory management vulnerability (CWE-404: Improper Resource Shutdown or Release) affecting Pyopenssl libraries in the PyPI ecosystem. The issue involves pyopenssl incorrect memory management. Remediation is available by upgrading affected packages to version 17.5.0.

CVE-2018-1000808 at a Glance

CVE Identifier CVE-2018-1000808
GHSA Identifier GHSA-2rcm-phc9-3945
Severity HIGH
CVSS v3.1 Base Score 5.9
CWE Classification CWE-404: Improper Resource Shutdown or Release
Affected Product Pyopenssl
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 5.9

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/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 None (C:N)
Integrity None (I:N)
Availability High (A:H)

How to Fix CVE-2018-1000808

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-1000808, 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-404: Improper Resource Shutdown or Release, where the product does not release or incorrectly releases a resource before it is made available for re-use. 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 performing operations on a PKCS #12 store. A remote attacker could possibly use this issue to cause pyOpenSSL to consume resources, resulting in a denial of service. This attack appear to be exploitable via Depends upon calling application, however it could be as simple as initiating a TLS connection that would cause the calling application to reload certificates from a PKCS #12 store. This vulnerability appears to have been fixed in 17.5.0.

CVE-2018-1000808 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-1000808?
CVE-2018-1000808 is a security vulnerability in Pyopenssl involving Pyopenssl Incorrect Memory Management under CWE-404: Improper Resource Shutdown or Release.
Which Pyopenssl versions are affected?
Affected versions include releases prior to 17.5.0 across affected packages: pyopenssl.
What version fixes CVE-2018-1000808?
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-1000808?
CVE-2018-1000808 has a CVSS v3.1 base score of 5.9 (HIGH) with vector string CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H.
What CWE is associated with CVE-2018-1000808?
CVE-2018-1000808 is classified under CWE-404: Improper Resource Shutdown or Release (The product does not release or incorrectly releases a resource before it is made available for re-use.).
How can I check PyPI dependencies for CVE-2018-1000808?
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-2rcm-phc9-3945",
  "modified" : "2024-10-21T21:06:54Z",
  "published" : "2018-10-10T16:10:23Z",
  "aliases" : [ "CVE-2018-1000808" ],
  "summary" : "Pyopenssl Incorrect Memory Management",
  "details" : "It was discovered that pyOpenSSL incorrectly handled memory when performing operations on a PKCS #12 store. A remote attacker could possibly use this issue to cause pyOpenSSL to consume resources, resulting in a denial of service.\n\nThis attack appear to be exploitable via Depends upon calling application, however it could be as simple as initiating a TLS connection that would cause the calling application to reload certificates from a PKCS #12 store. This vulnerability appears to have been fixed in 17.5.0.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N"
  } ],
  "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-1000808"
  }, {
    "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" : "ADVISORY",
    "url" : "https://github.com/advisories/GHSA-2rcm-phc9-3945"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/pyca/pyopenssl"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/pyopenssl/PYSEC-2018-24.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-401", "CWE-404" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-06-16T20:52:58Z",
    "nvd_published_at" : "2018-10-08T15:29:00Z"
  }
}