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…
- Published
- Updated
- Reserved
- Assigned by
- mitre
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.
Scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| CISA-ADPADP (enrichment) | 3.1 | Medium4.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:N |
| NVDNVD · Modified | 3.1 | Medium4.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:N |
- EPSS (exploitation in 30 days)
- 3.7% · top 10% of all CVEs (4 Nov 2026)
- CISA SSVC
- Exploitation: none · Automatable: no · Technical impact: partial
The list uses the assigner's score when there is one, then CISA's, then NVD's: Medium 4.3.
Weakness
Affected products
n/a
- affected n/a
References (18)
- https://bugs.python.org/issue35121 (opens in a new tab)x_refsource_MISCx_transferred
- https://python-security.readthedocs.io/vuln/cookie-domain-check.html (opens in a new tab)x_refsource_MISCx_transferred
- [debian-lts-announce] 20190817 [SECURITY] [DLA 1889-1] python3.4 security update (opens in a new tab)mailing-listx_refsource_MLISTx_transferred
- openSUSE-SU-2019:1988 (opens in a new tab)vendor-advisoryx_refsource_SUSEx_transferred
- openSUSE-SU-2019:1989 (opens in a new tab)vendor-advisoryx_refsource_SUSEx_transferred
- [debian-lts-announce] 20190831 [SECURITY] [DLA 1906-1] python2.7 security update (opens in a new tab)mailing-listx_refsource_MLISTx_transferred
- USN-4127-2 (opens in a new tab)vendor-advisoryx_refsource_UBUNTUx_transferred
- USN-4127-1 (opens in a new tab)vendor-advisoryx_refsource_UBUNTUx_transferred
- RHSA-2019:3725 (opens in a new tab)vendor-advisoryx_refsource_REDHATx_transferred
- FEDORA-2019-0d3fcae639 (opens in a new tab)vendor-advisoryx_refsource_FEDORAx_transferred
- FEDORA-2019-74ba24605e (opens in a new tab)vendor-advisoryx_refsource_FEDORAx_transferred
- FEDORA-2019-758824a3ff (opens in a new tab)vendor-advisoryx_refsource_FEDORAx_transferred
- RHSA-2019:3948 (opens in a new tab)vendor-advisoryx_refsource_REDHATx_transferred
- openSUSE-SU-2020:0086 (opens in a new tab)vendor-advisoryx_refsource_SUSEx_transferred
- GLSA-202003-26 (opens in a new tab)vendor-advisoryx_refsource_GENTOOx_transferred
- https://www.oracle.com/security-alerts/cpuapr2020.html (opens in a new tab)x_refsource_MISCx_transferred
- [debian-lts-announce] 20200715 [SECURITY] [DLA 2280-1] python3.5 security update (opens in a new tab)mailing-listx_refsource_MLISTx_transferred
- [debian-lts-announce] 20200822 [SECURITY] [DLA 2337-1] python2.7 security update (opens in a new tab)mailing-listx_refsource_MLISTx_transferred
Sources
The same CVE in the primary databases and aggregators, to check against.
- CVE.org record (opens in a new tab)
- CVE List JSON (GitHub) (opens in a new tab)
- NVD (opens in a new tab)
- FIRST EPSS (opens in a new tab)
- OSV.dev (opens in a new tab)
- GitHub Advisories (opens in a new tab)
- CIRCL Vulnerability-Lookup (opens in a new tab)
Badge for a README or a ticket
[](https://trackcve.app/cve/CVE-2018-20852)Record last updated .