# CVE-2018-6594: Pycrypto generates weak key parameters

Source: https://junglewise.ai/threats/cve-2018-6594-pycrypto-generates-weak-key-parameters  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2018-02-03  
License: CC BY 4.0 with a link back

CVE-2018-6594 · Severity: low · CVSS 3 · Published 2018-02-03

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.

Technologies: [pycrypto (PyPI)](https://junglewise.ai/threats/technologies/pypi-pycrypto). Vendors: [PyPI](https://junglewise.ai/threats/vendors/pypi).

## Quick answers

**Is CVE-2018-6594 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2018-6594 being exploited in the wild.

**How severe is CVE-2018-6594?** Low severity, with a CVSS score of 3, published 3 February 2018.

**Which products and versions are affected?** pycrypto (PyPI) ECOSYSTEM:introduced=0, ECOSYSTEM:introduced=0,last_affected=2.6.1.

**Is there a fix for CVE-2018-6594?** No fixed version is recorded yet. Check the vendor's advisory in the references below. If you run it, Junglewise drafts a mitigation that fits your setup and applies it once you approve, with senior security engineers behind it.

**Am I affected by CVE-2018-6594?** Check whether you run pycrypto (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## Affected products

- pycrypto (PyPI) ECOSYSTEM:introduced=0, ECOSYSTEM:introduced=0,last_affected=2.6.1

## Identifiers

- CVE-2018-6594
- GHSA-6528-wvf6-f6qg
- PYSEC-2018-97

## Related threats

- [Buffer Overflow in pycrypto](https://junglewise.ai/threats/cve-2013-7459-buffer-overflow-in-pycrypto)
- [PyCrypto does not properly reseed PRNG before allowing access](https://junglewise.ai/threats/cve-2013-1445-pycrypto-does-not-properly-reseed-prng-before-allowing-access)
- [PyCrypto makes Use of Insufficiently Random Values](https://junglewise.ai/threats/cve-2012-2417-pycrypto-makes-use-of-insufficiently-random-values)
