CVE-2024-12797: Cryptography Vulnerable OpenSSL Included Vulnerability

LOW
Advisory Identifier: GHSA-79v4-65xg-pq4g
CWE-392 CWE-1395
Published
Advisory Summary

CVE-2024-12797 is a LOW vulnerable openssl included vulnerability (CWE-392: Missing Report of Error Condition) affecting Cryptography libraries in the PyPI ecosystem. The issue involves vulnerable openssl included in cryptography wheels. Remediation is available by upgrading affected packages to version 44.0.1.

CVE-2024-12797 at a Glance

CVE Identifier CVE-2024-12797
GHSA Identifier GHSA-79v4-65xg-pq4g
Severity LOW
CVSS v3.1 Base Score N/A
CWE Classification CWE-392: Missing Report of Error Condition
Affected Product Cryptography
Package Ecosystem PyPI
Published Date
Last Updated

How to Fix CVE-2024-12797

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

cryptography fixed: 44.0.1
pip install cryptography>=44.0.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 cryptography

How to Check if You Are Affected

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

pip show cryptography

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

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

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-392: Missing Report of Error Condition, where the product encounters an error but does not provide a status code or return value to indicate that an error has occurred. In Cryptography, 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

pyca/cryptography's wheels include a statically linked copy of OpenSSL. The versions of OpenSSL included in cryptography 42.0.0-44.0.0 are vulnerable to a security issue. More details about the vulnerability itself can be found in https://openssl-library.org/news/secadv/20250211.txt. If you are building cryptography source ("sdist") then you are responsible for upgrading your copy of OpenSSL. Only users installing from wheels built by the cryptography project (i.e., those distributed on PyPI) need to update their cryptography versions.

CVE-2024-12797 Affected Cryptography Versions

1 component(s)
Fixed Versions:
44.0.1
Product / Package Ecosystem Affected Versions Fixed Version
cryptography
PyPI
≥ 42.0.0
< 44.0.1
44.0.1

References

Frequently Asked Questions

What is CVE-2024-12797?
CVE-2024-12797 is a security vulnerability in Cryptography involving Vulnerable OpenSSL included in cryptography wheels under CWE-392: Missing Report of Error Condition.
Which Cryptography versions are affected?
Affected versions include releases prior to 44.0.1 across affected packages: cryptography.
What version fixes CVE-2024-12797?
Upgrading to 44.0.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is cryptography affected?
Yes, cryptography is affected in releases prior to 44.0.1. Upgrade your dependency to 44.0.1 or later.
What CWE is associated with CVE-2024-12797?
CVE-2024-12797 is classified under CWE-392: Missing Report of Error Condition (The product encounters an error but does not provide a status code or return value to indicate that an error has occurred.).
How can I check PyPI dependencies for CVE-2024-12797?
Run the dependency tree command: 'pip show cryptography'. 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-79v4-65xg-pq4g",
  "modified" : "2025-02-12T18:20:06Z",
  "published" : "2025-02-11T18:06:42Z",
  "aliases" : [ "CVE-2024-12797" ],
  "summary" : "Vulnerable OpenSSL included in cryptography wheels",
  "details" : "pyca/cryptography's wheels include a statically linked copy of OpenSSL. The versions of OpenSSL included in cryptography 42.0.0-44.0.0 are vulnerable to a security issue. More details about the vulnerability itself can be found in https://openssl-library.org/news/secadv/20250211.txt.\n\nIf you are building cryptography source (\"sdist\") then you are responsible for upgrading your copy of OpenSSL. Only users installing from wheels built by the cryptography project (i.e., those distributed on PyPI) need to update their cryptography versions.",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "cryptography"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "42.0.0"
      }, {
        "fixed" : "44.0.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/pyca/cryptography/security/advisories/GHSA-79v4-65xg-pq4g"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-12797"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/openssl/openssl/commit/738d4f9fdeaad57660dcba50a619fafced3fd5e9"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/openssl/openssl/commit/798779d43494549b611233f92652f0da5328fbe7"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/openssl/openssl/commit/87ebd203feffcf92ad5889df92f90bb0ee10a699"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/pyca/cryptography"
  }, {
    "type" : "WEB",
    "url" : "https://openssl-library.org/news/secadv/20250211.txt"
  }, {
    "type" : "WEB",
    "url" : "http://www.openwall.com/lists/oss-security/2025/02/11/3"
  }, {
    "type" : "WEB",
    "url" : "http://www.openwall.com/lists/oss-security/2025/02/11/4"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-1395", "CWE-392" ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-02-11T18:06:42Z",
    "nvd_published_at" : "2025-02-11T16:15:38Z"
  }
}