CVE-2013-7040: Medium severity Apple iOS and macOS vulnerability
CVE-2018-20852 http.cookiejar.DefaultPolicy.domainreturnok in Lib/http/cookiejar.py in Python before 3.7.3 does not correctly validate the domain: it can be tricked into sending existing cookies to the wrong server. An attacker may abuse this flaw by using a server with a hostname that has another valid hostname as a suffix (e.g., pythonicexample.com to steal cookies for example.com). When a program uses http.cookiejar.DefaultPolicy and tries to do an HTTP connection to an attacker-controlled server, existing cookies can be leaked to the attacker. This affects 2.x through 2.7.16, 3.x before 3.4.10, 3.5.x before 3.5.7, 3.6.x before 3.6.9, and 3.7.x before 3.7.3. CVE-2014-4616 Array index error in the scanstring function in the json module in Python 2.7 through 3.5 and simplejson before 2.6.1 allows context-dependent attackers to read arbitrary process memory via a negative index value in the idx argument to the rawdecode function. 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.
Affected Software
Event History
Frequently Asked Questions
What is the severity of CVE-2013-7040?
CVE-2013-7040 has a medium severity level due to the potential for denial of service attacks through predictable hash collisions.
How do I fix CVE-2013-7040?
To fix CVE-2013-7040, upgrade to Python versions 2.7.8 or later, which contain the necessary patches.
What versions of Python are affected by CVE-2013-7040?
CVE-2013-7040 affects Python versions 2.7.1 through 2.7.7, as well as some earlier versions of Python 3.
How can CVE-2013-7040 be exploited?
CVE-2013-7040 can be exploited by attackers to cause a denial of service through the generation of hash collisions.
Is CVE-2013-7040 relevant for macOS users?
Yes, macOS versions up to 10.10.4 are also impacted by CVE-2013-7040 if they utilize the affected Python versions.