CVE-2018-20852

Summary

CVECVE-2018-20852
StatePUBLISHED
Assignermitre
Source PriorityCVE Program / NVD first with legacy fallback
Published2019-07-13 21:15:10 UTC
Updated2026-10-07 19:17:11 UTC
Descriptionhttp.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.

Risk And Classification

Primary CVSS: v3.1 4.3 MEDIUM from ADP

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:N

Problem Types: CWE-20 | n/a | CWE-20 CWE-20 Improper Input Validation


VersionSourceTypeScoreSeverityVector
3.1ADPDECLARED4.3MEDIUMCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:N
3.1134c704f-9b21-4f2e-91b3-4a467353bcc0Secondary4.3MEDIUMCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:N
3.0[email protected]Primary5.3MEDIUMCVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
2.0[email protected]Primary5AV:N/AC:L/Au:N/C:P/I:N/A:N

CVSS v3.1 Breakdown

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Unchanged
Confidentiality
Low
Integrity
None
Availability
None

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:N

CVSS v3.0 Breakdown

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
Low
Integrity
None
Availability
None

CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N

CVSS v2.0 Breakdown

Access Vector
Network
Access Complexity
Low
Authentication
None
Confidentiality
Partial
Integrity
None
Availability
None

AV:N/AC:L/Au:N/C:P/I:N/A:N

NVD Known Affected Configurations (CPE 2.3)

TypeVendorProductVersionUpdateEditionLanguage
Application Python Python All All All All
Application Python Python All All All All

Vendor Declared Affected Products

SourceVendorProductVersionPlatforms
CNA Na N/a affected n/a Not specified

References

ReferenceSourceLinkTags
Python: Multiple vulnerabilities (GLSA 202003-26) — Gentoo security af854a3a-2127-422b-91ae-364da2661108 security.gentoo.org
Issue 35121: [CVE-2018-20852] Cookie domain check returns incorrect results - Python tracker af854a3a-2127-422b-91ae-364da2661108 bugs.python.org Exploit, Issue Tracking, Vendor Advisory
[SECURITY] [DLA 2280-1] python3.5 security update af854a3a-2127-422b-91ae-364da2661108 lists.debian.org
USN-4127-2: Python vulnerabilities | Ubuntu security notices | Ubuntu af854a3a-2127-422b-91ae-364da2661108 usn.ubuntu.com
[SECURITY] [DLA 1889-1] python3.4 security update af854a3a-2127-422b-91ae-364da2661108 lists.debian.org
Maze Found | Read the Docs af854a3a-2127-422b-91ae-364da2661108 python-security.readthedocs.io Vendor Advisory
[SECURITY] [DLA 2337-1] python2.7 security update af854a3a-2127-422b-91ae-364da2661108 lists.debian.org
[SECURITY] [DLA 1906-1] python2.7 security update af854a3a-2127-422b-91ae-364da2661108 lists.debian.org
[security-announce] openSUSE-SU-2019:1989-1: moderate: Security update f af854a3a-2127-422b-91ae-364da2661108 lists.opensuse.org
[security-announce] openSUSE-SU-2020:0086-1: important: Security update af854a3a-2127-422b-91ae-364da2661108 lists.opensuse.org
[SECURITY] Fedora 29 Update: python2-docs-2.7.17-1.fc29 - package-announce - Fedora Mailing-Lists af854a3a-2127-422b-91ae-364da2661108 lists.fedoraproject.org
Oracle Critical Patch Update Advisory - April 2020 af854a3a-2127-422b-91ae-364da2661108 www.oracle.com
[SECURITY] Fedora 30 Update: python2-docs-2.7.17-1.fc30 - package-announce - Fedora Mailing-Lists af854a3a-2127-422b-91ae-364da2661108 lists.fedoraproject.org
[SECURITY] Fedora 31 Update: python2-docs-2.7.17-1.fc31 - package-announce - Fedora Mailing-Lists af854a3a-2127-422b-91ae-364da2661108 lists.fedoraproject.org
Red Hat Customer Portal af854a3a-2127-422b-91ae-364da2661108 access.redhat.com
Red Hat Customer Portal af854a3a-2127-422b-91ae-364da2661108 access.redhat.com
[security-announce] openSUSE-SU-2019:1988-1: moderate: Security update f af854a3a-2127-422b-91ae-364da2661108 lists.opensuse.org
USN-4127-1: Python vulnerabilities | Ubuntu security notices | Ubuntu af854a3a-2127-422b-91ae-364da2661108 usn.ubuntu.com
[SECURITY] Fedora 31 Update: python2-docs-2.7.17-1.fc31 - package-announce - Fedora Mailing-Lists MITRE lists.fedoraproject.org
[SECURITY] Fedora 30 Update: python2-docs-2.7.17-1.fc30 - package-announce - Fedora Mailing-Lists MITRE lists.fedoraproject.org
[SECURITY] Fedora 29 Update: python2-docs-2.7.17-1.fc29 - package-announce - Fedora Mailing-Lists MITRE lists.fedoraproject.org
CVE Program record CVE.ORG www.cve.org canonical
NVD vulnerability detail NVD nvd.nist.gov canonical, analysis

Legacy QID Mappings

  • 159655 Oracle Enterprise Linux Security Update for python27:2.7 (ELSA-2020-1605)
  • 377436 Alibaba Cloud Linux Security Update for python (ALINUX2-SA-2020:0081)
  • 377490 Alibaba Cloud Linux Security Update for python3 (ALINUX2-SA-2020:0073)
  • 671062 EulerOS Security Update for python (EulerOS-SA-2019-2442)
  • 940120 AlmaLinux Security Update for python27:2.7 (ALSA-2020:1605)

© CVE.report 2026

Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. It is the responsibility of user to evaluate the accuracy, completeness or usefulness of any information, opinion, advice or other content. EACH USER WILL BE SOLELY RESPONSIBLE FOR ANY consequences of his or her direct or indirect use of this web site. ALL WARRANTIES OF ANY KIND ARE EXPRESSLY DISCLAIMED. This site will NOT BE LIABLE FOR ANY DIRECT, INDIRECT or any other kind of loss.

CVE, CWE, and OVAL are registred trademarks of The MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. This site includes MITRE data granted under the following license.

Free CVE JSON API cve.report/api

CVE.report and Source URL Uptime Status status.cve.report