cryptography@41.0.7 vulnerabilities

cryptography is a package which provides cryptographic recipes and primitives to Python developers.

  • latest version

    44.0.2

  • latest non vulnerable version

  • first published

    11 years ago

  • latest version published

    1 months ago

  • licenses detected

  • Direct Vulnerabilities

    Known vulnerabilities in the cryptography package. This does not include vulnerabilities belonging to this package’s dependencies.

    How to fix?

    Automatically find and fix vulnerabilities affecting your projects. Snyk scans for vulnerabilities and provides fixes for free.

    Fix for free
    VulnerabilityVulnerable Version
    • H
    Type Confusion

    Affected versions of this package are vulnerable to Type Confusion in the do_x509_check() function in x509/v3_utl.c, which is responsible for certificate name checks. An application that specifies an expected DNS name, Email address or IP address that performs a name check on an otherName subject alternative name of an X.509 certificate can be made to crash when it attempts to read an invalid memory address.

    Note: Users that are building cryptography source ("sdist") are responsible for upgrading their copy of OpenSSL.

    How to fix Type Confusion?

    Upgrade cryptography to version 43.0.1 or higher.

    [37.0.0,43.0.1)
    • L
    Uncontrolled Resource Consumption

    Affected versions of this package are vulnerable to Uncontrolled Resource Consumption due to improper user input validation in the EVP_PKEY_param_check or EVP_PKEY_public_check functions. An attacker can cause a denial of service by supplying excessively long DSA keys or parameters obtained from an untrusted source.

    Note:

    OpenSSL does not call these functions on untrusted DSA keys, so only applications that directly call these functions may be vulnerable.

    Also vulnerable are the OpenSSL pkey and pkeyparam command line applications when using the "-check" option.

    How to fix Uncontrolled Resource Consumption?

    Upgrade cryptography to version 42.0.8 or higher.

    [0,42.0.8)
    • L
    Uncontrolled Resource Consumption ('Resource Exhaustion')

    Affected versions of this package are vulnerable to Uncontrolled Resource Consumption ('Resource Exhaustion') due to the session cache entering an incorrect state and failing to flush properly as it fills, leading to uncontrolled memory consumption. This condition is triggered under certain server configurations when processing TLSv1.3 sessions. Specifically, this occurs if the non-default SSL_OP_NO_TICKET option is enabled, but not if early_data support is configured along with the default anti-replay protection. A malicious client could deliberately create this scenario to force a service disruption. It may also occur accidentally in normal operation.

    Note:

    This issue is only exploitable if the server supports TLSv1.3 and is configured with the SSL_OP_NO_TICKET option enabled.

    How to fix Uncontrolled Resource Consumption ('Resource Exhaustion')?

    Upgrade cryptography to version 42.0.6 or higher.

    [35.0.0,42.0.6)
    • M
    NULL Pointer Dereference

    Affected versions of this package are vulnerable to NULL Pointer Dereference in the pkcs12.serialize_key_and_certificates function. An attacker can crash the Python process.

    Note: This is only exploitable if the vulnerable function is called with both:

    1. A certificate whose public key does not match the provided private key.

    2. An encryption_algorithm with hmac_hash set via PrivateFormat.PKCS12.encryption_builder().hmac_hash(...).

    How to fix NULL Pointer Dereference?

    Upgrade cryptography to version 42.0.4 or higher.

    [38.0.0,42.0.4)
    • M
    NULL Pointer Dereference

    Affected versions of this package are vulnerable to NULL Pointer Dereference when processing a maliciously formatted PKCS12 file. The vulnerability exists due to improper handling of optional ContentInfo fields, which can be set to null. An attacker can cause a denial of service by sending crafted input that leads to applications loading files in PKCS12 format from untrusted sources to terminate abruptly.

    How to fix NULL Pointer Dereference?

    Upgrade cryptography to version 42.0.2 or higher.

    [,42.0.2)
    • M
    Resource Exhaustion

    Affected versions of this package are vulnerable to Resource Exhaustion via the EVP_PKEY_public_check function. When the function is called in RSA public keys, a computation is done to confirm that the RSA modulus, n, is composite. For valid RSA keys, n is a product of two or more large primes and this computation completes quickly. However, if n is a large prime, this computation takes a long time. An attacker can cause a denial of service by supplying a specially crafted RSA key that triggers extensive computation.

    How to fix Resource Exhaustion?

    Upgrade cryptography to version 42.0.2 or higher.

    [35.0.0,42.0.2)
    • H
    Observable Timing Discrepancy

    Affected versions of this package are vulnerable to Observable Timing Discrepancy. This issue may allow a remote attacker to decrypt captured messages in TLS servers that use RSA key exchanges, which may lead to exposure of confidential or sensitive data (Marvin).

    Note:

    This vulnerability exists due to an incomplete fix for CVE-2020-25659.

    How to fix Observable Timing Discrepancy?

    Upgrade cryptography to version 42.0.0 or higher.

    [,42.0.0)
    • M
    Denial of Service (DoS)

    Affected versions of this package are vulnerable to Denial of Service (DoS) when the DH_generate_key(), DH_check_pub_key(), DH_check_pub_key_ex(), EVP_PKEY_public_check(), and EVP_PKEY_generate() functions are used. An attacker can cause long delays and potentially a Denial of Service by supplying excessively long X9.42 DH keys or parameters obtained from an untrusted source.

    Note:

    This is only exploitable if the application uses these functions to generate or check an X9.42 DH key or parameters. Also, the OpenSSL pkey command line application, when using the -pubcheck option, as well as the OpenSSL genpkey command line application, are vulnerable to this issue.

    How to fix Denial of Service (DoS)?

    Upgrade cryptography to version 42.0.0 or higher.

    [,42.0.0)