CVE-2012-2417 PyCrypto makes Use of Insufficiently Random Values

Medium 4.3 Published Updated

Weak prime generation in PyCrypto ElGamal keys allows attackers to brute force private keys and decrypt data.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2012-2417?

CVE-2012-2417 is a medium-severity vulnerability in n/a, published on 17 Jun 2012. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

PyCrypto before 2.6 does not produce appropriate prime numbers when using an ElGamal scheme to generate a key, which reduces the signature space or public key space and makes it easier for attackers to conduct brute force attacks to obtain the private key.

Weakness: CWE-310

Which versions are affected by CVE-2012-2417?

3 open source packages ship an affected version, including pycrypto and PyCrypto. It affects 1 product.

PackageAffectedFixed in
pycrypto PyPIAll versions2.6
pycrypto PyPIAll versions2.6
PyCrypto PyPIAll versions2.6

Products include Dlitz Pycrypto.

How do I fix CVE-2012-2417?

Upgrade pycrypto to 2.6 or later.

Is CVE-2012-2417 being exploited?

There is no known exploitation of CVE-2012-2417 in the wild and no public exploit code.

Sources

Also known as DSA-2502-1, GHSA-v367-p58w-98h5, PYSEC-2012-16.

Is CVE-2012-2417 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free