Vulnerabilities in pkg:pypi/pyOpenSSL

PACKAGE
Advisory Identifier: GHSA-6748-36qp-fx6r
Advisory Summary

CVE-2013-4314 is a HIGH (CVSS 7.5) pyopenssl mishandles nul byte vulnerability (CWE-20: Improper Input Validation) affecting PyOpenSSL libraries in the PyPI ecosystem. The issue involves pyopenssl mishandles nul byte in certificate subject alternative name. Remediation is available by upgrading affected packages to version 0.13.1.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:pypi/pyOpenSSL

1 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-6748-36qp-fx6r CVE-2013-4314 HIGH PyOpenSSL Mishandles NUL Byte In Certificate Subject Alternative Name

CVE-2013-4314 at a Glance

CVE Identifier CVE-2013-4314
GHSA Identifier GHSA-6748-36qp-fx6r
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-20: Improper Input Validation
Affected Product PyOpenSSL
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 7.5

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

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

How to Fix CVE-2013-4314

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: 0.13.1
pip install pyOpenSSL>=0.13.1
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-2013-4314, 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 0.13.1), 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-20: Improper Input Validation, where the product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly. 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

The X509Extension in pyOpenSSL before 0.13.1 does not properly handle a `\0` character in a domain name in the Subject Alternative Name field of an X.509 certificate, which allows man-in-the-middle attackers to spoof arbitrary SSL servers via a crafted certificate issued by a legitimate Certification Authority.

CVE-2013-4314 Affected PyOpenSSL Versions

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

References

Frequently Asked Questions

What is CVE-2013-4314?
CVE-2013-4314 is a security vulnerability in PyOpenSSL involving PyOpenSSL Mishandles NUL Byte In Certificate Subject Alternative Name under CWE-20: Improper Input Validation.
Which PyOpenSSL versions are affected?
Affected versions include releases prior to 0.13.1 across affected packages: pyOpenSSL.
What version fixes CVE-2013-4314?
Upgrading to 0.13.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is pyOpenSSL affected?
Yes, pyOpenSSL is affected in releases prior to 0.13.1. Upgrade your dependency to 0.13.1 or later.
What is the CVSS score of CVE-2013-4314?
CVE-2013-4314 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N.
What CWE is associated with CVE-2013-4314?
CVE-2013-4314 is classified under CWE-20: Improper Input Validation (The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.).
How can I check PyPI dependencies for CVE-2013-4314?
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-6748-36qp-fx6r",
  "modified" : "2024-10-24T21:47:16Z",
  "published" : "2022-05-17T04:56:46Z",
  "aliases" : [ "CVE-2013-4314" ],
  "summary" : "PyOpenSSL Mishandles NUL Byte In Certificate Subject Alternative Name",
  "details" : "The X509Extension in pyOpenSSL before 0.13.1 does not properly handle a `\\0` character in a domain name in the Subject Alternative Name field of an X.509 certificate, which allows man-in-the-middle attackers to spoof arbitrary SSL servers via a crafted certificate issued by a legitimate Certification Authority.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "pyOpenSSL"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.13.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2013-4314"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pyca/pyopenssl/commit/6bbf44a00b35fb28df1f66aa194b2fe95eab1ab2"
  }, {
    "type" : "WEB",
    "url" : "https://bugzilla.redhat.com/show_bug.cgi?id=1005325"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/pyca/pyopenssl"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/pyopenssl/PYSEC-2013-31.yaml"
  }, {
    "type" : "WEB",
    "url" : "https://mail.python.org/pipermail/pyopenssl-users/2013-September/000478.html"
  }, {
    "type" : "WEB",
    "url" : "http://lists.opensuse.org/opensuse-updates/2013-11/msg00015.html"
  }, {
    "type" : "WEB",
    "url" : "http://www.debian.org/security/2013/dsa-2763"
  }, {
    "type" : "WEB",
    "url" : "http://www.openwall.com/lists/oss-security/2013/09/06/2"
  }, {
    "type" : "WEB",
    "url" : "http://www.ubuntu.com/usn/USN-1965-1"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-20" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-02-23T20:57:09Z",
    "nvd_published_at" : "2013-09-30T21:55:00Z"
  }
}