Critical Side-Channel Vulnerability in PyCryptodome: OAEP Decryption Exploitation
Summary
DEBIAN-CVE-2023-52323: PyCryptodome and pycryptodomex before 3.19.1 allow side-channel leakage for OAEP decryption, exploitable for a Manger attack. Affects pycryptodome versions < 3.20.0+dfsg-1. Fixed in 3.20.0+dfsg-1. How to fix ↓
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.
No signup required · Results in about 60 seconds
Background
PyCryptodome is a self-contained Python package of low-level cryptographic primitives. It provides cryptographic services such as encryption, decryption, and hashing. The package is widely used in applications requiring secure data transmission. However, prior to version 3.19.1, it was susceptible to a side-channel attack during OAEP decryption, which could potentially compromise sensitive information.
Vulnerability Detail
The vulnerability allows for side-channel leakage during OAEP decryption, making it exploitable for a Manger attack. This type of attack can enable an adversary to recover plaintext from ciphertext by exploiting timing or power consumption variations during the decryption process. The flaw exists in versions of PyCryptodome and pycryptodomex before 3.19.1, posing a significant risk to applications relying on secure cryptographic operations.
How To Fix
Minimum fixed version
3.20.0+dfsg-1
This is the first release that contains the fix.
sudo apt-get install --only-upgrade pycryptodome
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
As a temporary workaround, consider using alternative cryptographic libraries that do not exhibit this vulnerability, or implement additional security measures to mitigate the risk of side-channel attacks until the package can be updated.
Conclusion
The vulnerability in PyCryptodome presents a serious risk due to its potential for exploitation through side-channel attacks. Users are strongly advised to update to the latest patched version to safeguard their applications. Additionally, utilizing tools like Vulert can help monitor and alert for such vulnerabilities in real-time.
See every vulnerability recorded for pycryptodome →
FAQ
A side-channel attack is a method of compromising a cryptographic system by analyzing information gained from the physical implementation of the system, rather than exploiting weaknesses in the algorithms themselves.
You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.
If exploited, this vulnerability could allow attackers to recover sensitive plaintext data from encrypted messages, leading to data breaches and loss of confidentiality.
Yes, you can implement additional security measures, such as using alternative libraries or enhancing your application’s security posture to reduce the risk of side-channel attacks.
Versions of PyCryptodome and pycryptodomex prior to 3.19.1 are affected by this vulnerability.
References
Related vulnerabilities
Recent vulnerabilities recorded for pycryptodome.