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.
CVE-2018-20852
Score 5.3 from GitHub Security Advisory published 2022-05-24. NVD baseline CVSS 5.3; sources differ by 0.0.
- Lower severity and no public exploit yet
A fix is available — apply it.
- CVSS v3
- 5.3
- EG Score
- 5.3(medium)
- EG Risk
- —
- EPSS
- 89.5%
- KEV
- Not listed
Published
July 13, 2019
Last Modified
November 21, 2024
References (36)
- cve@mitrehttp://lists.opensuse.org/opensuse-security-announce/2019-08/msg00071.html
- cve@mitrehttp://lists.opensuse.org/opensuse-security-announce/2019-08/msg00074.html
- cve@mitrehttp://lists.opensuse.org/opensuse-security-announce/2020-01/msg00040.html
- cve@mitrehttps://access.redhat.com/errata/RHSA-2019:3725
- cve@mitrehttps://access.redhat.com/errata/RHSA-2019:3948
- cve@mitrehttps://bugs.python.org/issue35121
- cve@mitrehttps://lists.debian.org/debian-lts-announce/2019/08/msg00022.html
- cve@mitrehttps://lists.debian.org/debian-lts-announce/2019/08/msg00040.html
- cve@mitrehttps://lists.debian.org/debian-lts-announce/2020/07/msg00011.html
- cve@mitrehttps://lists.debian.org/debian-lts-announce/2020/08/msg00034.html
- cve@mitrehttps://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/COATURTCY7G67AYI6UDV5B2JZTBCKIDX/
- cve@mitrehttps://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/K7HNVIFMETMFWWWUNTB72KYJYXCZOS5V/
- cve@mitrehttps://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/ZBTGPBUABGXZ7WH7677OEM3NSP6ZEA76/
- cve@mitrehttps://python-security.readthedocs.io/vuln/cookie-domain-check.html
- cve@mitrehttps://security.gentoo.org/glsa/202003-26
Vendor Advisories for CVE-2018-20852(4)
These vendors published their own advisory mentioning this CVE — often with vendor-specific remediation steps + affected product lists not in NVD.
- RHSA-2020:1605Red Hat Product SecurityMedium
Red Hat Security Advisory: python27:2.7 security, bug fix, and enhancement update
- RHBA-2020:1539Red Hat Product SecurityCritical
Red Hat Bug Fix Advisory: Red Hat Ansible Tower 3.5.6-1 - RHEL7 Container
- RHBA-2020:1540Red Hat Product SecurityCritical
Red Hat Bug Fix Advisory: Red Hat Ansible Tower 3.6.4-1 - RHEL7 Container
- RHSA-2019:3725Red Hat Product SecurityMedium
Red Hat Security Advisory: rh-python36-python security, bug fix, and enhancement update
Patch Availability(11)
| Vendor / Ecosystem | Fixed in / Patch | Released | Source |
|---|---|---|---|
| ubuntu | python3.5-venv (3.5.2-2ubuntu0~16.04.8) @ xenial | 2026-05-27 | ubuntu |
| ubuntu | python3.4-venv (3.4.3-1ubuntu1~14.04.7+esm2) @ trusty | 2026-05-27 | ubuntu |
| ubuntu | python3.9-venv (3.9.5-3ubuntu0~20.04.1+esm2) @ focal | 2026-05-27 | ubuntu |
| redhat | python3-0:3.6.8-23.el8 | 2020-04-28 | redhat |
| redhat | python27:2.7-8020020200117110429.90f98d4f | 2020-04-28 | redhat |
| redhat | ansible-tower-35/ansible-tower:3.5.6-1 | 2020-04-22 | redhat |
| redhat | ansible-tower-36/ansible-tower:3.6.4-1 | 2020-04-22 | redhat |
| redhat | python3-0:3.6.8-13.el7 | 2020-03-31 | redhat |
| redhat | python-0:2.7.5-88.el7 | 2020-03-31 | redhat |
| redhat | python27-python-0:2.7.17-2.el7 | 2019-11-25 | redhat |
| redhat | rh-python36-python-0:3.6.9-2.el7 | 2019-11-06 | redhat |
Patches are aggregated from vendor advisories (Red Hat, Microsoft, Cisco, GitHub) and package ecosystems (OSV, GHSA). Multiple rows for the same upstream release have been deduplicated.
Weakness Classification(1)
MITRE Common Weakness Enumeration — the root-cause categories this CVE belongs to.
Additional Vendor Advisories
(7)
Vendors that published advisories for this CVE beyond the curated set above. Broader coverage but minimal per-row detail — click through for the original advisory.
- Red HatRHSA-2019:3948MODERATE2018-10-31
RHSA-2019:3948 — Moderate
- Red HatRHSA-2020:1131MODERATE2018-10-31
RHSA-2020:1131 — Moderate
- Red HatRHSA-2020:1132MODERATE2018-10-31
RHSA-2020:1132 — Moderate
- Red HatRHSA-2020:1764MODERATE2018-10-31
RHSA-2020:1764 — Moderate
- UbuntuUSN-4127-1MEDIUM
Python vulnerabilities
- UbuntuUSN-4127-2MEDIUM
Python vulnerabilities
- UbuntuUSN-6891-1MEDIUM
Python vulnerabilities
Data Freshness Timeline
(refreshed 11× in last 7d / 46× in last 30d)
Each row is a source pipeline that fetched or updated this CVE on that date, with what changed. For example, "NVD update" means NVD published or revised its analysis for this CVE; "MITRE cvelistV5" means we ingested or refreshed it from the CNA feed. Most recent first.
- 2026-07-22 22:15 UTCEG score recompute
- 2026-07-22 14:05 UTCEPSS rescore
- 2026-07-21 15:22 UTCEPSS rescore
- 2026-07-20 17:04 UTCEPSS rescore
- 2026-07-20 17:04 UTCEPSS rescore
- 2026-07-20 13:02 UTCOSV refresh
- 2026-07-19 14:28 UTCEPSS rescore
- 2026-07-19 02:26 UTCEPSS rescore
- 2026-07-19 02:26 UTCEPSS rescore
- 2026-07-16 16:59 UTCEPSS rescore
- 2026-07-16 16:59 UTCEPSS rescore
- 2026-07-15 16:55 UTCEPSS rescore
- 2026-07-15 16:55 UTCEPSS rescore
- 2026-07-15 01:56 UTCEPSS rescore
- 2026-07-15 01:56 UTCEPSS rescore
- 2026-07-13 22:27 UTCEPSS rescore
- 2026-07-13 22:26 UTCEPSS rescore
- 2026-07-12 05:43 UTCEPSS rescore
- 2026-07-11 08:24 UTCEPSS rescore
- 2026-07-09 19:06 UTCEPSS rescore
- 2026-07-08 15:11 UTCEPSS rescore
- 2026-07-07 13:42 UTCEPSS rescore
- 2026-07-07 13:42 UTCEPSS rescore
- 2026-07-06 16:24 UTCEPSS rescore
- 2026-07-06 16:24 UTCEPSS rescore
Show 74 moreShow fewer
- 2026-07-06 02:20 UTCEPSS rescore
- 2026-07-05 02:27 UTCEPSS rescore
- 2026-07-04 06:28 UTCEPSS rescore
- 2026-07-04 06:28 UTCEPSS rescore
- 2026-07-03 07:56 UTCOSV refresh
- 2026-07-02 16:54 UTCEPSS rescore
- 2026-07-01 15:03 UTCEPSS rescore
- 2026-07-01 15:03 UTCEPSS rescore
- 2026-06-30 23:20 UTCEPSS rescore
- 2026-06-30 23:19 UTCEPSS rescore
- 2026-06-28 04:53 UTCEPSS rescore
- 2026-06-28 04:53 UTCEPSS rescore
- 2026-06-27 03:06 UTCEPSS rescore
- 2026-06-27 03:06 UTCEPSS rescore
- 2026-06-25 13:47 UTCEPSS rescore
- 2026-06-25 13:47 UTCEPSS rescore
- 2026-06-24 14:02 UTCEPSS rescore
- 2026-06-24 14:02 UTCEPSS rescore
- 2026-06-23 21:30 UTCEPSS rescore
- 2026-06-23 21:30 UTCEPSS rescore
- 2026-06-23 21:30 UTCEPSS rescore
- 2026-06-22 14:23 UTCEPSS rescore
- 2026-06-21 14:54 UTCEPSS rescore
- 2026-06-21 14:54 UTCEPSS rescore
- 2026-06-21 01:57 UTCEPSS rescore
- 2026-06-21 01:57 UTCEPSS rescore
- 2026-06-19 19:23 UTCEPSS rescore
- 2026-06-19 19:23 UTCEPSS rescore
- 2026-06-18 17:50 UTCEPSS rescore
- 2026-06-18 17:50 UTCEPSS rescore
- 2026-06-17 17:50 UTCEPSS rescore
- 2026-06-17 17:50 UTCEPSS rescore
- 2026-06-16 17:50 UTCEPSS rescore
- 2026-06-16 17:50 UTCEPSS rescore
- 2026-06-15 17:45 UTCEPSS rescore
- 2026-06-14 23:15 UTCEPSS rescore
- 2026-06-14 23:14 UTCEPSS rescore
- 2026-06-14 22:43 UTCOSV refresh
- 2026-06-13 22:58 UTCEPSS rescore
- 2026-06-12 23:09 UTCEPSS rescore
- 2026-06-12 23:09 UTCEPSS rescore
- 2026-06-11 13:57 UTCEPSS rescore
- 2026-06-10 22:16 UTCEPSS rescore
- 2026-06-10 13:19 UTCEPSS rescore
- 2026-06-08 14:14 UTCEPSS rescore
- 2026-06-08 14:14 UTCEPSS rescore
- 2026-06-07 15:22 UTCEPSS rescore
- 2026-06-07 15:22 UTCEPSS rescore
- 2026-06-06 13:45 UTCEPSS rescore
- 2026-06-06 13:45 UTCEPSS rescore
- 2026-06-05 22:45 UTCEPSS rescore
- 2026-06-05 22:45 UTCEPSS rescore
- 2026-06-05 06:08 UTCEPSS rescore
- 2026-06-05 06:08 UTCEPSS rescore
- 2026-06-04 13:10 UTCEPSS rescore
- 2026-06-02 20:11 UTCEPSS rescore
- 2026-06-02 20:11 UTCEPSS rescore
- 2026-06-01 13:50 UTCEPSS rescore
- 2026-06-01 13:50 UTCEPSS rescore
- 2026-05-31 22:29 UTCEPSS rescore
- 2026-05-31 00:14 UTCEPSS rescore
- 2026-05-31 00:14 UTCEPSS rescore
- 2026-05-29 13:41 UTCEPSS rescore
- 2026-05-28 13:42 UTCEPSS rescore
- 2026-05-28 13:42 UTCEPSS rescore
- 2026-05-27 17:24 UTCEG score recompute
- 2026-05-27 17:24 UTCVendor advisory
- 2026-05-27 17:24 UTCGHSA enrichment
- 2026-05-27 13:38 UTCEPSS rescore
- 2026-05-27 13:38 UTCEPSS rescore
- 2026-05-26 13:42 UTCEPSS rescore
- 2026-05-26 13:42 UTCEPSS rescore
- 2026-05-26 07:17 UTCEPSS rescore
- 2026-05-26 07:17 UTCEPSS rescore
Related CVEs(same vendor + same CWE)
Same vendor
10 shownredhat
Frequently asked(5)
What is CVE-2018-20852?
When was CVE-2018-20852 disclosed?
Is CVE-2018-20852 actively exploited?
What is the CVSS score of CVE-2018-20852?
How do I remediate CVE-2018-20852?
Dependency Blast Radius
Explore the affected products and dependency analysis for CVE-2018-20852
Is Your Infrastructure Affected by CVE-2018-20852?
EchelonGraph automatically scans your cloud infrastructure and maps CVE exposure using blast radius analysis.