Critical Vulnerability in python-cryptography: Potential Decryption of TLS Messages

python-cryptography Updated 02 Oct 2025

Summary

05/02/2024
N/A
Yes i
Unrated
Not published

DEBIAN-CVE-2023-50782: A flaw was found in the python-cryptography package. Affects python-cryptography versions < 42.0.5-1. Fixed in 42.0.5-1. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

The python-cryptography package is a widely used library in Python for cryptographic operations, including encryption, decryption, and secure communication. It provides essential tools for developers to implement secure protocols and protect sensitive data. However, a recently discovered vulnerability poses a significant risk to applications relying on RSA key exchanges in TLS servers, potentially exposing confidential information.

Vulnerability Detail

A flaw was identified in the python-cryptography package that may allow a remote attacker to decrypt captured messages in TLS servers utilizing RSA key exchanges. This vulnerability could lead to the exposure of confidential or sensitive data, compromising the integrity and confidentiality of communications. The issue arises from the way the package handles RSA key exchanges, making it susceptible to attacks that exploit this weakness.

How To Fix

Minimum fixed version

42.0.5-1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade python-cryptography

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary measure, users can avoid using RSA key exchanges in TLS configurations until the package is updated. This may involve switching to alternative key exchange mechanisms that are not affected by this vulnerability.

Conclusion

The python-cryptography package has a critical vulnerability that could allow attackers to decrypt sensitive TLS messages. It is crucial for users to update to the patched version to protect their applications from potential data breaches. Implementing the recommended fixes and workarounds will help maintain the security of your systems.

See every vulnerability recorded for python-cryptography →

Share this vulnerability

FAQ

The vulnerability allows remote attackers to decrypt messages captured in TLS servers using RSA key exchanges, potentially exposing sensitive data.

You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without requiring any signup.

Update the python-cryptography package to version 42.0.5-1 or later to mitigate the vulnerability.

Yes, consider avoiding RSA key exchanges in TLS configurations until the package is updated.

Related vulnerabilities

Recent vulnerabilities recorded for python-cryptography.

How To Fix

Minimum fixed version

42.0.5-1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade python-cryptography

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback