CVE-2018-6594: Weak Encryption
Last updated 25 August 2025
Other sources
lib/Crypto/PublicKey/ElGamal.py in PyCrypto through 2.6.1 generates weak ElGamal key parameters, which allows attackers to obtain sensitive information by reading ciphertext data (i.e., it does not have semantic security in face of a ciphertext-only attack). The Decisional Diffie-Hellman (DDH) assumption does not hold for PyCrypto's ElGamal implementation.
— Launchpad
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
debian/pycryptodometo a version that resolves this vulnerability.Fixed in 3.9.7+dfsg1-1Fixed in 3.11.0+dfsg1-4Fixed in 3.20.0+dfsg-3 - Upgrade
Upgrade
PyCryptoto a version that resolves this vulnerability.Fixed in 2.6.1 - Compensating control
Mitigate ciphertext-only exposure by preventing attackers from accessing ciphertexts that could be targeted against PyCrypto's ElGamal implementation.
Event History
Frequently Asked Questions
What is the severity of CVE-2018-6594?
CVE-2018-6594 is classified as a medium severity vulnerability due to its potential to expose sensitive information.
How do I fix CVE-2018-6594?
To fix CVE-2018-6594, upgrade from PyCrypto version 2.6.1 to an alternative library such as PyCryptodome or a newer version of PyCryptography.
What software is affected by CVE-2018-6594?
CVE-2018-6594 affects PyCrypto versions up to and including 2.6.1 and various Debian and Ubuntu Linux distributions with specific versions.
What type of attack does CVE-2018-6594 allow for?
CVE-2018-6594 allows attackers to perform ciphertext-only attacks by exploiting weak ElGamal key parameters.
Is CVE-2018-6594 still a concern for users?
Yes, CVE-2018-6594 remains a concern for users still utilizing vulnerable versions of PyCrypto.