CVE-2018-6594 json
Pycrypto generates weak key parameters
published 2018-02-03 8 y ago modified 2026-06-17 4 mo ago also GHSA-6528-wvf6-f6qg , PYSEC-2018-97 , EUVD-2018-0119
- cvss
- 7.5
- version 3.0, NVD
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 2.0%
- EPSS 2.0% chance of exploitation in 30 days, percentile 81%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- pycryptodome Debian 14, Debian 13, Debian 12 3.4.11-1
debian advisories DEBIAN-CVE-2018-6594
- pycryptodome Ubuntu 18.04 LTS 3.4.7-1ubuntu1
- python-crypto Ubuntu 14.04 LTS 2.6.1-4ubuntu0.3
- python-crypto Ubuntu 16.04 LTS 2.6.1-6ubuntu0.16.04.3
- python-crypto Ubuntu 18.04 LTS 2.6.1-8ubuntu2
ubuntu advisories UBUNTU-CVE-2018-6594
Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2018-6594 updated cvss 5.3
python-crypto: Weak ElGamal key parameters in PublicKey/ElGamal.py allow attackers to obtain sensitive information by reading ciphertext
-
Red Hat CloudForms Management Engine 5 python-crypto, python2-crypto Red Hat Ceph Storage 1.3 python-crypto Red Hat Ceph Storage 2 python-crypto Red Hat Ceph Storage 3 python-crypto, python2-crypto Red Hat Enterprise Linux 6 python-crypto Red Hat Enterprise Linux 7 python-cryptoaffected: no fix planned “Will not fix”
+12 more productsfewer
Red Hat Enterprise Linux OpenStack Platform 6 (Juno) python-crypto Red Hat Enterprise Linux OpenStack Platform 7 (Kilo) python-crypto, python2-crypto Red Hat OpenShift Enterprise 3 python-crypto, python2-crypto Red Hat OpenStack Platform 8 (Liberty) python-crypto, python2-crypto Red Hat OpenStack Platform 9 (Mitaka) python-crypto, python2-crypto Red Hat OpenStack Platform 10 (Newton) python-crypto, python2-crypto Red Hat OpenStack Platform 11 (Ocata) python-crypto Red Hat OpenStack Platform 12 (Pike) python2-crypto Red Hat OpenStack Platform 13 (Queens) python2-crypto Red Hat Storage 3 python-crypto, python2-crypto Red Hat Storage Console 2 python-crypto Red Hat Virtualization 4 python-crypto
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
Exploit prediction
2.03% chance of exploitation in the next 30 days, higher than 81% of all scored CVEs (FIRST EPSS, 2026-11-08).
Exploits and checks
- github.com https://github.com/dlitz/pycrypto/issues/253 referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| NVD | 3.0 | 7.5 | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N |
| NVD | 2.0 | 5.0 | AV:N/AC:L/Au:N/C:P/I:N/A:N |
| GitHub | 3.0 | 7.5 | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| pypi | pycrypto | <=2.6.1 all versions |
no fix listed |
Classification
- Weakness
-
- CWE-326 Inadequate Encryption Strength
References
-
github.com
/dlitz/pycrypto/issues/253
web, exploit, issue-tracking, third-party-advisory, report
-
usn.ubuntu.com
/3616-1/
vendor-advisory, third-party-advisory, web
-
usn.ubuntu.com
/3616-2/
vendor-advisory, third-party-advisory, web
-
security.gentoo.org
/glsa/202007-62
vendor-advisory, web, advisory
-
github.com
/TElgamal/attack-on-pycrypto-elgamal
web, third-party-advisory
-
lists.debian.org
/debian-lts-announce/2018/02/msg00018.html
mailing-list, web, third-party-advisory
-
nvd.nist.gov
/vuln/detail/CVE-2018-6594
advisory
-
github.com
/advisories/GHSA-6528-wvf6-f6qg
advisory
-
github.com
/dlitz/pycrypto
package
-
github.com
/pypa/advisory-database/tree/main/vulns/pycrypto/PYSEC-2018-97.yaml
web
-
usn.ubuntu.com
/3616-1
web
-
usn.ubuntu.com
/3616-2
web
Sources
- CVE List CVE-2018-6594
- GitHub Advisory GHSA-6528-wvf6-f6qg
- NVD CVE-2018-6594
- OSV PYSEC-2018-97
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.