Medium severity · published Jul 13, 2019
CVE-2018-20852
http.cookiejar.DefaultPolicy.domain_return_ok in Lib/http/cookiejar.py in Python before 3.7.3 does not correctly validate the domain: it can be tricked into sending existing…
4.3
CVSS
3.7%
EPSS
No
On KEV
Description
http.cookiejar.DefaultPolicy.domain_return_ok 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.
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:N
Attack vector
Network
Complexity
Low
Privileges
None
User interaction
Required
Confidentiality
Low
Integrity
None
Availability
None
Scope
Unchanged
Exploitation
Is it being used?
Exploit prediction (EPSS)3.7% · higher than 90% of CVEs
Exploited in the wildNo evidence yet
CISA KEVNot listed
Ransomware campaign useNot known
Affected products
Which versions
PY
Python · Python
2.0 through 2.7.16; 3.0.0 before 3.4.10; 3.5.0 before 3.5.7; 3.6.0 before 3.6.9; 3.7.0 before 3.7.3 · source: NVD
References
NVD
https://nvd.nist.gov/vuln/detail/CVE-2018-20852
CVE.org
https://www.cve.org/CVERecord?id=CVE-2018-20852
x_refsource_MISC
https://bugs.python.org/issue35121
x_refsource_MISC
https://python-security.readthedocs.io/vuln/cookie-domain-check.html
mailing-list
https://lists.debian.org/debian-lts-announce/2019/08/msg00022.html
vendor-advisory
http://lists.opensuse.org/opensuse-security-announce/2019-08/msg00071.html
vendor-advisory
http://lists.opensuse.org/opensuse-security-announce/2019-08/msg00074.html
mailing-list
https://lists.debian.org/debian-lts-announce/2019/08/msg00040.html
More from Python
9.8
CVE-2022-48565
An XML External Entity (XXE) issue was discovered in Python through 3.9.1
9.8
CVE-2022-37454
The Keccak XKCP SHA-3 reference implementation before fdc6fef has an integer overflow and resultant buffer overflow that allows attackers to execute arbitrary code or eliminate…
9.8
CVE-2021-29921
In Python before 3,9,5, the ipaddress library mishandles leading zero characters in the octets of an IP address string
9.8
CVE-2021-3177
Python 3.x through 3.9.1 has a buffer overflow in PyCArg_repr in _ctypes/callproc.c, which may lead to remote code execution in certain Python applications that accept…
9.8
CVE-2020-27619
In Python 3 through 3.9.0, the Lib/test/multibytecodec_support.py CJK codec tests call eval() on content retrieved via HTTP
