.. _hash-function-not-randomized-properly: Hash function not randomized properly ===================================== .. warning:: This resource is maintained for historical reference and **does not contain the latest vulnerability info for Python**. The `canonical database for vulnerabilities affecting Python `_ is available on GitHub in the Open Source Vulnerability (OSV) format. This vulnerability can be viewed online at the `Open Source Vulnerability Database `_. The hash function is not randomized properly. Python 3.4 now used SipHash (PEP 456). Python 3.3 and Python 2.7 are still affected. Dates: * Disclosure date: **2012-04-19** (Python issue bpo-14621 reported) Fixed In -------- * Python **3.4.0** (2014-03-16) fixed by `commit 985ecdc (branch 3.4) `_ (2013-11-20) Python issue ------------ Hash function is not randomized properly. * Python issue: `bpo-14621 `_ * Creation date: 2012-04-19 * Reporter: Vlado Boza 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. * CVE ID: `CVE-2013-7040 `_ * Published: 2014-05-19 * `CVSS Score `_: 4.3 Timeline -------- Timeline using the disclosure date **2012-04-19** as reference: * 2012-04-19: `Python issue bpo-14621 `_ reported by Vlado Boza * 2013-11-20 (**+580 days**): `commit 985ecdc (branch 3.4) `_ * 2014-03-16 (**+696 days**): Python 3.4.0 released * 2014-05-19 (**+760 days**): CVE-2013-7040 published