High
Security advisory
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.
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2018-6594
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 31 Oct 2026, 10:44 UTC · Revision 1
Source evidence
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.
osv:CVE-2018-6594
Complete source record
{
"id": "d0c094e900f286b11405d41e0e1a49956679322b548a63af91fc62077daf012c",
"url": "https://osv.dev/vulnerability/CVE-2018-6594",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "CVE-2018-6594",
"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.",
"evidence": "osv:CVE-2018-6594",
"products": [],
"severity": "high",
"structured": {
"id": "CVE-2018-6594",
"aliases": [
"CVE-2018-6594",
"GHSA-6528-wvf6-f6qg",
"PYSEC-2018-97"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://github.com/pycrypto/pycrypto",
"type": "GIT",
"events": [
{
"introduced": "0"
},
{
"last_affected": "7fd528d03b5eae58eef6fd219af5d9ac9c83fa50"
}
],
"database_specific": {
"extracted_events": [
{
"cpe": "cpe:2.3:a:dlitz:pycrypto:*:*:*:*:*:*:*:*",
"range": [
{
"introduced": "0"
},
{
"last_affected": "2.6.1"
}
],
"source": "CPE_RANGE"
}
]
}
}
],
"versions": [
"v2.6.1",
"v2.6",
"v2.5",
"v2.4.1",
"v2.4",
"v2.3",
"v2.2",
"v2.1.0",
"v2.1.0b1",
"v2.1.0alpha2",
"v2.1.0alpha1",
"v1.9a5",
"v1.9a4",
"v1.9a3",
"v1.9a2",
"v1.9a1"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2018-6594.json"
}
}
],
"modified": "2026-10-20T10:51:34.909382552Z",
"provider": "osv",
"references": [
"https://github.com/TElgamal/attack-on-pycrypto-elgamal",
"https://lists.debian.org/debian-lts-announce/2018/02/msg00018.html",
"https://security.gentoo.org/glsa/202007-62",
"https://usn.ubuntu.com/3616-1/",
"https://usn.ubuntu.com/3616-2/",
"https://github.com/dlitz/pycrypto/issues/253"
],
"provider_metadata": {
"unresolved_ranges": [
{
"cpes": [
"cpe:2.3:o:canonical:ubuntu_linux:12.04:*:*:*:esm:*:*:*",
"cpe:2.3:o:canonical:ubuntu_linux:14.04:*:*:*:lts:*:*:*",
"cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:*",
"cpe:2.3:o:canonical:ubuntu_linux:17.10:*:*:*:*:*:*:*"
],
"vendor_product": "canonical:ubuntu_linux",
"extracted_events": [
{
"range": [
{
"introduced": "12.04"
},
{
"last_affected": "12.04"
},
{
"introduced": "14.04"
},
{
"last_affected": "14.04"
},
{
"introduced": "16.04"
},
{
"last_affected": "16.04"
},
{
"introduced": "17.10"
},
{
"last_affected": "17.10"
}
],
"source": "CPE_STRING"
}
]
},
{
"cpes": [
"cpe:2.3:o:debian:debian_linux:7.0:*:*:*:*:*:*:*"
],
"vendor_product": "debian:debian_linux",
"extracted_events": [
{
"range": [
{
"introduced": "7.0"
},
{
"last_affected": "7.0"
}
],
"source": "CPE_STRING"
}
]
}
]
}
},
"related_cves": [
{
"value": "CVE-2018-6594",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 382600,
"published_at": "2018-02-03T15:29:00.653+00:00"
}