7.5high

CVE-2018-6594

Pycrypto generates weak key parameters

Also known as GHSA-6528-wvf6-f6qg, PYSEC-2018-97

Published 8 y ago · modified 4 mo ago · JSON

CVSS
7.5
v3.0 · NVD
CISA KEV
No
not known exploited
EPSS
2.0%
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.

Exploit prediction (EPSS)

2.03% probability of exploitation in the next 30 days, higher than 81% of all scored CVEs.

CVSS scores

Assigned byVersionScoreVector
NVD3.07.5CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
NVD2.05.0AV:N/AC:L/Au:N/C:P/I:N/A:N
GitHub3.07.5CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N

Affected packages

EcosystemPackageAffectedFixed in
pypipycrypto
<=2.6.1
all versions
no fix listed

Classification

Weakness
  • CWE-326 Inadequate Encryption Strength

References

  • github.com /TElgamal/attack-on-pycrypto-elgamal · x_refsource_MISC, x_transferred
  • usn.ubuntu.com /3616-1/ · vendor-advisory, x_refsource_UBUNTU, x_transferred
  • github.com /dlitz/pycrypto/issues/253 · x_refsource_MISC, x_transferred
  • lists.debian.org /debian-lts-announce/2018/02/msg00018.html · mailing-list, x_refsource_MLIST, x_transferred
  • usn.ubuntu.com /3616-2/ · vendor-advisory, x_refsource_UBUNTU, x_transferred
  • security.gentoo.org /glsa/202007-62 · vendor-advisory, x_refsource_GENTOO, x_transferred
  • 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

vulnwire keeps one entry per vulnerability: the CVE id wins, then GHSA; records that alias each other are merged. Machine-readable: JSON.