CVE-2013-7040

CVE-2013-7040 is a medium-severity vulnerability in Python with a CVSS 2.0 base score of 4.3. It is not currently listed as actively exploited by CISA, and its EPSS exploit-prediction score is low. The underlying weakness is classified as CWE-310.

Key facts

Description

Python 2.7 before 3.4 only uses the last eight bits of the prefix to randomize hash values, which causes it to compute hash values without restricting the ability to trigger hash collisions predictably and makes it easier for context-dependent attackers to cause a denial of service (CPU consumption) via crafted input to an application that maintains a hash table. NOTE: this vulnerability exists because of an incomplete fix for CVE-2012-1150.

Frequently asked questions

What is CVE-2013-7040?
Python 2.7 before 3.4 only uses the last eight bits of the prefix to randomize hash values, which causes it to compute hash values without restricting the ability to trigger hash collisions predictably and makes it easier for context-dependent attackers to cause a denial of service (CPU consumption) via crafted input to an application that maintains a hash table. NOTE: this vulnerability exists because of an incomplete fix for CVE-2012-1150.
How severe is CVE-2013-7040?
CVE-2013-7040 has a CVSS 2.0 base score of 4.3, rated medium severity.
Is CVE-2013-7040 being actively exploited?
It is not currently listed in CISA's KEV catalog. Its EPSS exploit-prediction score is 3% (87th percentile), an estimate of the probability of exploitation in the next 30 days.
What products are affected by CVE-2013-7040?
CVE-2013-7040 primarily affects Python. In total, 42 product configurations (CPEs) are listed as vulnerable; see the affected-products list for the exact versions.
How do I fix CVE-2013-7040?
Review the linked vendor and NVD advisories for patched versions and mitigations, then upgrade or apply the recommended workaround.
When was CVE-2013-7040 published?
CVE-2013-7040 was published on 2014-05-19 and last updated on 2026-06-17.

References

Affected products (42)

More vulnerabilities in Python

All CVEs affecting Python →

Other CWE-310 (Cryptographic Issues) vulnerabilities

Browse all CWE-310 (Cryptographic Issues) vulnerabilities →

Threat intelligence

Threat-intel indicators referencing this CVE: