Vulnerabilities in pkg:pypi/sgx-dcap-quote-verify-python

PACKAGE
Advisory Summary

GHSA-344m-qcjq-xgrf is a HIGH vulnerable openssl included vulnerability (General Security Weakness) affecting Sgx dcap quote verify python libraries in the PyPI ecosystem. The issue involves vulnerable openssl included in sgx-dcap-quote-verify-python. Remediation is available by upgrading affected packages to version 0.0.3.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:pypi/sgx-dcap-quote-verify-python

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:pypi/sgx-dcap-quote-verify-python. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-344m-qcjq-xgrf - HIGH Vulnerable OpenSSL included in sgx-dcap-quote-verify-python

GHSA-344m-qcjq-xgrf at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-344m-qcjq-xgrf
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification General Security Weakness
Affected Product Sgx dcap quote verify python
Package Ecosystem PyPI
Published Date
Last Updated

How to Fix GHSA-344m-qcjq-xgrf

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

sgx-dcap-quote-verify-python fixed: 0.0.3
pip install sgx-dcap-quote-verify-python>=0.0.3
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 sgx-dcap-quote-verify-python

How to Check if You Are Affected

To determine whether your Python environment is affected by GHSA-344m-qcjq-xgrf, inspect your installed packages using pip:

pip show sgx-dcap-quote-verify-python

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

Note: The pip show sgx-dcap-quote-verify-python command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under General Security Weakness. In Sgx dcap quote verify python, 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

sgx-dcap-quote-verify-python includes a statically linked copy of OpenSSL. The version of OpenSSL included in sgx-dcap-quote-verify-python 0.0.1..0.0.2 is vulnerable to a security issue. More details about the OpenSSL vulnerabilities themselves can be found at https://www.openssl.org/news/secadv/20230207.txt. ## Analysis The binding includes OpenSSL version 1.1.1s which is vulnerable to the vulnerabilities disclosed in [OpenSSL Security Advisory from the 7th February 2023](https://www.openssl.org/news/secadv/20230207.txt). The binding does not directly use OpenSSL. The binding calls the SGX Quote Verification Library which uses OpenSSL. ## Explanation The SGX Quote Verification Library uses OpenSSL as a dependency to perform its cryptographic operations and certificate verification. The OpenSSL security advisory mentions multiple vulnerabilities but I believe the most concerning would be CVE-2023-0286 “X.400 address type confusion in X.509 GeneralName”. Its severity is rated high and the advisory states that “this vulnerability is most likely to only affect applications which have implemented their own functionality for retrieving CRLs over a network.” Relying on CRLs obtained from an untrusted party is exactly what can happen when verifying a quote. For instance, the vulnerability could be triggered through the "sgx_qv_verify_quote" function which can take untrusted quote collateral as input. The quote collateral contains a CRL and certificate chains. The Quote Verification Library uses OpenSSL to verify the validity of those in order to establish the authenticity of the quote. Thus the vulnerability could be exploited with corrupted/forged collateral and quote. ## Impact According to the advisory the "vulnerability may allow an attacker to pass arbitrary pointers to a memcmp call, enabling them to read memory contents or enact a denial of service". Transitively I expect the same to be true for the Quote Verification Library. The denial of service impact is not much of a concern I believe since processing forged collateral would most likely stop the software from proceeding normally anyway (forged collateral should be rejected). The part regarding the ability to read memory contents, could result in information disclosure which is a real concern. The quote verification happens on the relying party end, which might use it to check enclave authenticity before providing sensitive data, this vulnerability could therefore result in the leakage of sensitive data.

GHSA-344m-qcjq-xgrf Affected Sgx dcap quote verify python Versions

1 component(s)
Fixed Versions:
0.0.3
Product / Package Ecosystem Affected Versions Fixed Version
sgx-dcap-quote-verify-python
PyPI
< 0.0.3
0.0.3

References

Frequently Asked Questions

What is GHSA-344m-qcjq-xgrf?
GHSA-344m-qcjq-xgrf is a security vulnerability in Sgx dcap quote verify python involving Vulnerable OpenSSL included in sgx-dcap-quote-verify-python under General Security Weakness.
Which Sgx dcap quote verify python versions are affected?
Affected versions include releases prior to 0.0.3 across affected packages: sgx-dcap-quote-verify-python.
What version fixes GHSA-344m-qcjq-xgrf?
Upgrading to 0.0.3 (or the latest patched release for your respective branch) resolves the vulnerability.
Is sgx-dcap-quote-verify-python affected?
Yes, sgx-dcap-quote-verify-python is affected in releases prior to 0.0.3. Upgrade your dependency to 0.0.3 or later.
What CWE is associated with GHSA-344m-qcjq-xgrf?
GHSA-344m-qcjq-xgrf is classified under General Security Weakness.
How can I check PyPI dependencies for GHSA-344m-qcjq-xgrf?
Run the dependency tree command: 'pip show sgx-dcap-quote-verify-python'. 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-344m-qcjq-xgrf",
  "modified" : "2023-02-14T00:30:22Z",
  "published" : "2023-02-14T00:30:22Z",
  "aliases" : [ ],
  "summary" : "Vulnerable OpenSSL included in sgx-dcap-quote-verify-python",
  "details" : "sgx-dcap-quote-verify-python includes a statically linked copy of OpenSSL. The version of OpenSSL included in sgx-dcap-quote-verify-python 0.0.1..0.0.2 is vulnerable to a security issue. More details about the OpenSSL vulnerabilities themselves can be found at https://www.openssl.org/news/secadv/20230207.txt.\n\n## Analysis\nThe binding includes OpenSSL version 1.1.1s which is vulnerable to the vulnerabilities disclosed in [OpenSSL Security Advisory from the 7th February 2023](https://www.openssl.org/news/secadv/20230207.txt).\nThe binding does not directly use OpenSSL. The binding calls the SGX Quote Verification Library which uses OpenSSL.\n\n## Explanation\nThe SGX Quote Verification Library uses OpenSSL as a dependency to perform its cryptographic operations and certificate verification.\n\nThe OpenSSL security advisory mentions multiple vulnerabilities but I believe the most concerning would be CVE-2023-0286 “X.400 address type confusion in X.509 GeneralName”. Its severity is rated high and the advisory states that “this vulnerability is most likely to only affect applications which have implemented their own functionality for retrieving CRLs over a network.”\n\nRelying on CRLs obtained from an untrusted party is exactly what can happen when verifying a quote. For instance, the vulnerability could be triggered through the \"sgx_qv_verify_quote\" function which can take untrusted quote collateral as input. The quote collateral contains a CRL and certificate chains. The Quote Verification Library uses OpenSSL to verify the validity of those in order to establish the authenticity of the quote. Thus the vulnerability could be exploited with corrupted/forged collateral and quote.\n\n## Impact\n\nAccording to the advisory the \"vulnerability may allow an attacker to pass arbitrary pointers to a memcmp call, enabling them to read memory contents or enact a denial of service\". Transitively I expect the same to be true for the Quote Verification Library.\nThe denial of service impact is not much of a concern I believe since processing forged collateral would most likely stop the software from proceeding normally anyway (forged collateral should be rejected). The part regarding the ability to read memory contents, could result in information disclosure which is a real concern. The quote verification happens on the relying party end, which might use it to check enclave authenticity before providing sensitive data, this vulnerability could therefore result in the leakage of sensitive data.\n",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "sgx-dcap-quote-verify-python"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.0.3"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/mithril-security/sgx-dcap-quote-verify-python/security/advisories/GHSA-344m-qcjq-xgrf"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/mithril-security/sgx-dcap-quote-verify-python"
  } ],
  "database_specific" : {
    "cwe_ids" : [ ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-02-14T00:30:22Z",
    "nvd_published_at" : null
  }
}