CVE-2018-6594
Pycrypto generates weak key parameters
Reported by mitre · Published February 3, 2018
pycrypto is fixed in 2.6.1 (PyPI)
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.
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| pycrypto | PyPI | 2.6.1 |
| python3-crypto | Amazon Linux | 2.6.1-34.amzn2023.0.2 |
| pycryptodome | Ubuntu:18.04:LTS | 3.4.7-1ubuntu1 |
| pycrypto | dlitz | 2.6.1 |
| pathval | n/a | unspecified |
| python-crypto | Ubuntu:18.04:LTS | 2.6.1-8ubuntu2 |
| python-crypto | Ubuntu:16.04:LTS | 2.6.1-6ubuntu0.16.04.3 |
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| n/a | n/a | n/a |
| amazon:2023 | python3-crypto | 0 |
| n/a | n/a | * |
| PyPI | pycrypto | 0 |
Timeline
- Feb 3, 2018 CVE Published
- Oct 23, 2018 PoC Published
- Apr 14, 2021 EPSS Score (30 in total, the first dated here)
- Sep 8, 2025 CVE Updated
- Mar 6, 2026 Distribution Patch (2 in total, the first dated here)
- Mar 6, 2026 Security Advisory (4 in total, the first dated here)
- Sep 19, 2026 Coalition ESS Score
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2018-6594
vulnetix vdb fixes CVE-2018-6594
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2018-6594/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart
References
- x_refsource_MISC
- USN-3616-1 vendor-advisoryx_refsource_UBUNTU
- x_refsource_MISC
- [debian-lts-announce] 20180215 [SECURITY] [DLA 1283-1] python-crypto security update mailing-listx_refsource_MLIST
- USN-3616-2 vendor-advisoryx_refsource_UBUNTU
- GLSA-202007-62 vendor-advisoryx_refsource_GENTOO
- https://nvd.nist.gov/vuln/detail/CVE-2018-6594 advisory
- https://github.com/advisories/GHSA-6528-wvf6-f6qg advisory
- https://github.com/dlitz/pycrypto url
- https://github.com/pypa/advisory-database/tree/main/vulns/pycrypto/PYSEC-2018-97.yaml advisory
- https://usn.ubuntu.com/3616-1 url
- https://usn.ubuntu.com/3616-2 url