NULL Pointer Dereference Affecting cryptography package, versions [38.0.0, 42.0.4)


Severity

Recommended
0.0
medium
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.05% (18th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about NULL Pointer Dereference vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-PYTHON-CRYPTOGRAPHY-6261585
  • published22 Feb 2024
  • disclosed21 Feb 2024
  • creditUnknown

Introduced: 21 Feb 2024

CVE-2024-26130  (opens in a new tab)
CWE-476  (opens in a new tab)

How to fix?

Upgrade cryptography to version 42.0.4 or higher.

Overview

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(...).

CVSS Scores

version 3.1