CVE & CISA-KEV Catalog

CVE-2018-20852

MEDIUMEPSS 89th pctl
5.3
CVSS v3
NVD

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.

How to fix

Remediation Available
python2.7Debian
Fixed in:2.7.16-3CVE-2018-20852
python2.7Ubuntu
Fixed in:2.7.6-8ubuntu0.6+esm2USN-4127-2
Fixed in:2.7.12-1ubuntu0~16.04.8USN-4127-1
Fixed in:2.7.15-4ubuntu4~18.04.1USN-4127-1
python2.7-minimalUbuntu
Fixed in:2.7.6-8ubuntu0.6+esm2USN-4127-2
Fixed in:2.7.12-1ubuntu0~16.04.8USN-4127-1
Fixed in:2.7.15-4ubuntu4~18.04.1USN-4127-1
python3.10Ubuntu
Fixed in:3.10.12-1~22.04.4USN-6891-1
python3.10-minimalUbuntu
Fixed in:3.10.12-1~22.04.4USN-6891-1
python3.11Ubuntu
Fixed in:3.11.0~rc1-1~22.04.1~esm1USN-6891-1
Fixed in:3.11.6-3ubuntu0.1USN-6891-1
python3.11-minimalUbuntu
Fixed in:3.11.0~rc1-1~22.04.1~esm1USN-6891-1
Fixed in:3.11.6-3ubuntu0.1USN-6891-1
python3.12Ubuntu
Fixed in:3.12.0-1ubuntu0.1USN-6891-1
python3.12-minimalUbuntu
Fixed in:3.12.0-1ubuntu0.1USN-6891-1
python3.4Ubuntu
Fixed in:3.4.3-1ubuntu1~14.04.7+esm2USN-4127-2
python3.4-minimalUbuntu
Fixed in:3.4.3-1ubuntu1~14.04.7+esm2USN-4127-2
python3.5Ubuntu
Fixed in:3.5.2-2ubuntu0~16.04.4~14.04.1+esm1USN-6891-1
Fixed in:3.5.2-2ubuntu0~16.04.13+esm13USN-6891-1
Fixed in:3.5.2-2ubuntu0~16.04.8USN-4127-1
python3.5-minimalUbuntu
Fixed in:3.5.2-2ubuntu0~16.04.4~14.04.1+esm1USN-6891-1
Fixed in:3.5.2-2ubuntu0~16.04.13+esm13USN-6891-1
Fixed in:3.5.2-2ubuntu0~16.04.8USN-4127-1
python3.6Ubuntu
Fixed in:3.6.8-1~18.04.2USN-4127-1
Fixed in:3.6.9-1~18.04ubuntu1.13+esm2USN-6891-1
python3.6-minimalUbuntu
Fixed in:3.6.8-1~18.04.2USN-4127-1
Fixed in:3.6.9-1~18.04ubuntu1.13+esm2USN-6891-1
python3.7Ubuntu
Fixed in:3.7.5-2ubuntu1~18.04.2+esm3USN-6891-1
python3.7-minimalUbuntu
Fixed in:3.7.5-2ubuntu1~18.04.2+esm3USN-6891-1
python3.8Ubuntu
Fixed in:3.8.0-3ubuntu1~18.04.2+esm2USN-6891-1
Fixed in:3.8.10-0ubuntu1~20.04.10USN-6891-1
python3.8-minimalUbuntu
Fixed in:3.8.0-3ubuntu1~18.04.2+esm2USN-6891-1
Fixed in:3.8.10-0ubuntu1~20.04.10USN-6891-1
python3.9Ubuntu
Fixed in:3.9.5-3ubuntu0~20.04.1+esm2USN-6891-1
python3.9-minimalUbuntu
Fixed in:3.9.5-3ubuntu0~20.04.1+esm2USN-6891-1
Python 2Windows application
Affected:3.5.0 3.5.7Fixed in:3.5.7Python Software Foundation
Affected:3.7.0 3.7.3Fixed in:3.7.3Python Software Foundation
Affected:3.6.0 3.6.9Fixed in:3.6.9Python Software Foundation
Affected:3.0.0 3.4.10Fixed in:3.4.10Python Software Foundation
Python 3.10Windows application
Affected:3.5.0 3.5.7Fixed in:3.5.7Python Software Foundation
Affected:3.7.0 3.7.3Fixed in:3.7.3Python Software Foundation
Affected:3.0.0 3.4.10Fixed in:3.4.10Python Software Foundation
Affected:3.6.0 3.6.9Fixed in:3.6.9Python Software Foundation
Python 3.11Windows application
Affected:3.0.0 3.4.10Fixed in:3.4.10Python Software Foundation
Affected:3.6.0 3.6.9Fixed in:3.6.9Python Software Foundation
Affected:3.7.0 3.7.3Fixed in:3.7.3Python Software Foundation
Affected:3.5.0 3.5.7Fixed in:3.5.7Python Software Foundation
Python 3.12Windows application
Affected:3.5.0 3.5.7Fixed in:3.5.7Python Software Foundation
Affected:3.7.0 3.7.3Fixed in:3.7.3Python Software Foundation
Affected:3.6.0 3.6.9Fixed in:3.6.9Python Software Foundation
Affected:3.0.0 3.4.10Fixed in:3.4.10Python Software Foundation
Python 3.8Windows application
Affected:3.6.0 3.6.9Fixed in:3.6.9Python Software Foundation
Affected:3.7.0 3.7.3Fixed in:3.7.3Python Software Foundation
Affected:3.5.0 3.5.7Fixed in:3.5.7Python Software Foundation
Affected:3.0.0 3.4.10Fixed in:3.4.10Python Software Foundation
Python 3.9Windows application
Affected:3.0.0 3.4.10Fixed in:3.4.10Python Software Foundation
Affected:3.6.0 3.6.9Fixed in:3.6.9Python Software Foundation
Affected:3.5.0 3.5.7Fixed in:3.5.7Python Software Foundation
Affected:3.7.0 3.7.3Fixed in:3.7.3Python Software Foundation

Remediation is compiled from vendor and distribution security advisories. Always confirm against the linked source for your exact version and platform.

CVSS v3 Vector

Exploitability

Attack VectorNetwork
Attack ComplexityLow
Privileges RequiredNone
User InteractionNone
ScopeUnchanged

Impact

ConfidentialityLow
IntegrityNone
AvailabilityNone

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

Exploit Intelligence

3.88%probability of exploitation in 30 days
89thpercentile

Elevated risk: more likely to be exploited than 89% of all known CVEs.

References

Related Vulnerabilities

Other CWE-20 (Improper Input Validation) vulnerabilities, ordered by exploit likelihood. View all

CVESeverityCVSSEPSSExploitedFix
CVE-2024-3400Critical10.0100%KEV + Ransom-
CVE-2021-45105Medium5.9100%-Fix
CVE-2021-44228Critical10.0100%KEV + RansomFix
CVE-2021-21985Critical9.8100%KEV + RansomFix
CVE-2018-7600Critical9.8100%KEV + RansomFix
CVE-2020-3452High7.5100%KEVFix
Embed a live status badge for CVE-2018-20852
CVE-2018-20852 severity badge

Markdown

[![CVE-2018-20852](https://tridentstack.com/cve/badge/CVE-2018-20852.svg)](https://tridentstack.com/cve/CVE-2018-20852)

HTML

<a href="https://tridentstack.com/cve/CVE-2018-20852"><img src="https://tridentstack.com/cve/badge/CVE-2018-20852.svg" alt="CVE-2018-20852"></a>

Find and fix vulnerabilities across your fleet

TridentStack Control continuously scans your Windows, macOS, and Linux fleet for known vulnerabilities, prioritizes them by severity and active exploitation, and patches them automatically.

Start free

This product uses NVD data but is not endorsed or certified by the NVD. EPSS scores courtesy of FIRST.org (https://www.first.org/epss). Source: CISA KEV Catalog. Data as of 2024-11-21.