{"id":"CVE-2018-20852","url":"https://www.cyber-defence.io/tools/cve/CVE-2018-20852","generatedAt":"2026-10-28T19:04:54.013Z","title":"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).","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.","published":"2019-07-13T21:15:10.000Z","lastModified":"2026-10-07T19:17:12.000Z","status":"Modified","sourceIdentifier":"cve@mitre.org","cvss":{"version":"3.1","score":4.3,"severity":"MEDIUM","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:N"},"cwe":["CWE-20"],"affected":["python/python"],"epss":{"score":0.03668,"percentile":0.89589,"date":"2026-10-27","history":[]},"kev":{"listed":false},"exploits":{"count":0,"verified":false,"firstPublished":null,"source":"Exploit-DB (https://gitlab.com/exploit-database/exploitdb)","entries":[]},"verdict":{"level":"low","text":"Lower severity and a low EPSS score (3.67%). Track it; it rarely justifies an emergency change on its own."},"changes":[{"kind":"scored","label":"Newly scored","at":"2026-10-07T20:15:13.000Z","detail":{"from":"5.3","score":"4.3","severity":"MEDIUM","fromSeverity":"MEDIUM"},"summary":"Now scored CVSS 4.3 MEDIUM (was 5.3)."}],"references":[{"url":"http://lists.opensuse.org/opensuse-security-announce/2019-08/msg00071.html","source":"cve@mitre.org"},{"url":"http://lists.opensuse.org/opensuse-security-announce/2019-08/msg00074.html","source":"cve@mitre.org"},{"url":"http://lists.opensuse.org/opensuse-security-announce/2020-01/msg00040.html","source":"cve@mitre.org"},{"url":"https://access.redhat.com/errata/RHSA-2019:3725","source":"cve@mitre.org"},{"url":"https://access.redhat.com/errata/RHSA-2019:3948","source":"cve@mitre.org"},{"url":"https://bugs.python.org/issue35121","tags":["Exploit","Issue Tracking","Vendor Advisory"],"source":"cve@mitre.org"},{"url":"https://lists.debian.org/debian-lts-announce/2019/08/msg00022.html","source":"cve@mitre.org"},{"url":"https://lists.debian.org/debian-lts-announce/2019/08/msg00040.html","source":"cve@mitre.org"},{"url":"https://lists.debian.org/debian-lts-announce/2020/07/msg00011.html","source":"cve@mitre.org"},{"url":"https://lists.debian.org/debian-lts-announce/2020/08/msg00034.html","source":"cve@mitre.org"},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/COATURTCY7G67AYI6UDV5B2JZTBCKIDX/","source":"cve@mitre.org"},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/K7HNVIFMETMFWWWUNTB72KYJYXCZOS5V/","source":"cve@mitre.org"},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/ZBTGPBUABGXZ7WH7677OEM3NSP6ZEA76/","source":"cve@mitre.org"},{"url":"https://python-security.readthedocs.io/vuln/cookie-domain-check.html","tags":["Vendor Advisory"],"source":"cve@mitre.org"},{"url":"https://security.gentoo.org/glsa/202003-26","source":"cve@mitre.org"},{"url":"https://usn.ubuntu.com/4127-1/","source":"cve@mitre.org"},{"url":"https://usn.ubuntu.com/4127-2/","source":"cve@mitre.org"},{"url":"https://www.oracle.com/security-alerts/cpuapr2020.html","source":"cve@mitre.org"},{"url":"http://lists.opensuse.org/opensuse-security-announce/2019-08/msg00071.html","source":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"http://lists.opensuse.org/opensuse-security-announce/2019-08/msg00074.html","source":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"http://lists.opensuse.org/opensuse-security-announce/2020-01/msg00040.html","source":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"https://access.redhat.com/errata/RHSA-2019:3725","source":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"https://access.redhat.com/errata/RHSA-2019:3948","source":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"https://bugs.python.org/issue35121","tags":["Exploit","Issue Tracking","Vendor Advisory"],"source":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"https://lists.debian.org/debian-lts-announce/2019/08/msg00022.html","source":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"https://lists.debian.org/debian-lts-announce/2019/08/msg00040.html","source":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"https://lists.debian.org/debian-lts-announce/2020/07/msg00011.html","source":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"https://lists.debian.org/debian-lts-announce/2020/08/msg00034.html","source":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/COATURTCY7G67AYI6UDV5B2JZTBCKIDX/","source":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/K7HNVIFMETMFWWWUNTB72KYJYXCZOS5V/","source":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/ZBTGPBUABGXZ7WH7677OEM3NSP6ZEA76/","source":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"https://python-security.readthedocs.io/vuln/cookie-domain-check.html","tags":["Vendor Advisory"],"source":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"https://security.gentoo.org/glsa/202003-26","source":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"https://usn.ubuntu.com/4127-1/","source":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"https://usn.ubuntu.com/4127-2/","source":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"https://www.oracle.com/security-alerts/cpuapr2020.html","source":"af854a3a-2127-422b-91ae-364da2661108"}],"sources":{"nvd":"https://nvd.nist.gov/vuln/detail/CVE-2018-20852","epss":"https://www.first.org/epss/","kev":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","exploitdb":"https://www.exploit-db.com/"},"licence":"CC BY 4.0 — link back to the CVE Explorer if you publish the results; upstream data remains subject to its own terms."}