Missing Report of Error Condition Affecting cryptography package, versions [42.0.0,44.0.1)


Severity

Recommended
0.0
medium
0
10

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

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 IDSNYK-PYTHON-CRYPTOGRAPHY-8715586
  • published12 Feb 2025
  • disclosed11 Feb 2025
  • creditApple Inc.

Introduced: 11 Feb 2025

NewCVE-2024-12797  (opens in a new tab)
CWE-392  (opens in a new tab)

How to fix?

Upgrade cryptography to version 44.0.1 or higher.

Overview

Affected versions of this package are vulnerable to Missing Report of Error Condition causing server authentication failures to not be detected by clients, due to handshakes not aborting as expected when the SSL_VERIFY_PEER verification mode is set. An attacker could impersonate a legitimate server by performing a MitM attack on TLS and DTLS connections using Raw Public Keys (RPKs).

Note:

  1. This is only exploitable if TLS clients explicitly enable RPK use by the server, and the server, likewise, enables sending of an RPK instead of an X.509 certificate chain. The affected clients are those that then rely on the handshake to fail when the server's RPK fails to match one of the expected public keys, by setting the verification mode to SSL_VERIFY_PEER;

  2. Clients that enable server-side raw public keys can still find out that raw public key verification failed by calling SSL_get_verify_result(). Those that do, and take appropriate action, are not affected.

CVSS Scores

version 4.0
version 3.1