CVE-2018-6594
Pycrypto generates weak key parameters
CVE-2018-6594 is a high vulnerability (CVSS 7.5) in Dlitz Pycrypto, published February 3, 2018. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 2.03%, the 81st percentile. Fixed in pycryptodome 3.4.11-1.
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.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- High
- Integrity
- None
- Availability
- None
Exploit likelihood
What each source reports
NVD Score used
7.5
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.
- Record
CVE-2018-6594- CVSS 3.0
- 7.5 High
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N - CVSS 2.0
- 5.0 Medium
AV:N/AC:L/Au:N/C:P/I:N/A:N - Weakness
- CWE-326
- Updated
- 2026-11-02
CVE List No score
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.
- Record
CVE-2018-6594- Updated
- 2026-11-02
EUVDEUVD-2018-0119 No score
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.
- Record
EUVD-2018-0119- Updated
- 2026-11-03
GitHub AdvisoriesGHSA-6528-wvf6-f6qg
8.7
Pycrypto generates weak key parameters
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.
- Record
GHSA-6528-wvf6-f6qg- CVSS 4.0
- 8.7 High
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N - CVSS 3.0
- 7.5 High
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N - Weakness
- CWE-326
- Updated
- 2026-11-02
OSV
7.5
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.
- Record
CVE-2018-6594- CVSS 3.0
- 7.5 High
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N - Updated
- 2026-11-02
OSVDEBIAN-CVE-2018-6594
7.5
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.
- Record
DEBIAN-CVE-2018-6594- CVSS 3.0
- 7.5 High
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N - Updated
- 2026-11-02
Show 5 moreShow less
OSVGHSA-6528-wvf6-f6qg
8.7
Pycrypto generates weak key parameters
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.
- Record
GHSA-6528-wvf6-f6qg- CVSS 4.0
- 8.7 High
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N - CVSS 3.0
- 7.5 High
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N - Weakness
- CWE-326
- Updated
- 2026-11-02
OSVUBUNTU-CVE-2018-6594
7.5
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.
- Record
UBUNTU-CVE-2018-6594- CVSS 3.0
- 7.5 High
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N - Updated
- 2026-11-02
OSVMGASA-2018-0171 No score
Updated python-pycrypto packages fix security vulnerability
The textbook ElGamal implementation is not secure. PyCrypto and some other implementations use the wrong algorithm, which may lead to some information disclosure simply by looking at the encrypted text. For a full description, see https://github.com/dlitz/pycrypto/issues/253 This update includes a fix for this problem backported from pycryptodome.
- Record
MGASA-2018-0171- Updated
- 2026-11-02
OSVPYSEC-2018-97 No score
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.
- Record
PYSEC-2018-97- Updated
- 2026-11-02
OSVUSN-3616-1 No score
python-crypto vulnerability
It was discovered that Python Crypto incorrectly generated ElGamal key parameters. A remote attacker could possibly use this issue to obtain sensitive information.
- Record
USN-3616-1- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
pycryptoPyPI |
through 2.6.1 | None known |
pycryptodomeDebian:12 |
before 3.4.11-1 | 3.4.11-1 |
pycryptodomeDebian:13 |
before 3.4.11-1 | 3.4.11-1 |
pycryptodomeDebian:14 |
before 3.4.11-1 | 3.4.11-1 |
pycryptoPyPI |
through 2.6.1, plus listed versions 1.9a21.9a51.9a62.02.0.1 Show 7 moreShow less2.1.02.22.32.42.4.12.52.6 |
None known |
python-pycryptoMageia:5 |
before 2.6.1-6.2.mga5 | 2.6.1-6.2.mga5 |
python-pycryptoMageia:6 |
before 2.6.1-9.1.mga6 | 2.6.1-9.1.mga6 |
pycryptoPyPI |
All versions, plus listed versions 1.9a21.9a51.9a62.02.0.1 Show 8 moreShow less2.1.02.22.32.42.4.12.52.62.6.1 |
None known |
python-cryptoUbuntu:14.04:LTS |
before 2.6.1-4ubuntu0.3, plus listed versions 2.6-52.6.1-22.6.1-2build12.6.1-32.6.1-42.6.1-4build12.6.1-4ubuntu0.12.6.1-4ubuntu0.2 |
2.6.1-4ubuntu0.3 |
python-cryptoUbuntu:16.04:LTS |
before 2.6.1-6ubuntu0.16.04.3, plus listed versions 2.6.1-5build12.6.1-62.6.1-6build12.6.1-6ubuntu0.16.04.12.6.1-6ubuntu0.16.04.2 |
2.6.1-6ubuntu0.16.04.3 |
pycryptodomeUbuntu:18.04:LTS |
before 3.4.7-1ubuntu1, plus listed versions 3.4.6-13.4.7-1 |
3.4.7-1ubuntu1 |
python-cryptoUbuntu:18.04:LTS |
before 2.6.1-8ubuntu2, plus listed versions 2.6.1-7build22.6.1-8 |
2.6.1-8ubuntu2 |
History
| When | Changed | Sources |
|---|---|---|
| 2026-11-03 | aliases | EUVD |
| 2026-11-02 | created | CVE List, GitHub Advisories, NVD, OSV |
References
github.com/TElgamal/attack-on-pycrypto-elgamal
usn.ubuntu.com/3616-1
github.com/dlitz/pycrypto/issues/253
lists.debian.org/debian-lts-announce/2018/02/msg00018.html
usn.ubuntu.com/3616-2
security.gentoo.org/glsa/202007-62
Show 12 moreShow less
nvd.nist.gov/vuln/detail/CVE-2018-6594
github.com/advisories/GHSA-6528-wvf6-f6qg
github.com/pypa/advisory-database/tree/main/vulns/pycrypto/PYSEC-2018-97.yaml
security-tracker.debian.org/tracker/CVE-2018-6594
github.com/dlitz/pycrypto
advisories.mageia.org/MGASA-2018-0171.html
bugs.mageia.org/show_bug.cgi?id=22693
github.com/Legrandin/pycryptodome/issues/90
ubuntu.com/security/CVE-2018-6594
ubuntu.com/security/notices/USN-3616-1
ubuntu.com/security/notices/USN-3616-2
cve.org/CVERecord?id=CVE-2018-6594