PT-2019-5708 · Python+8 · Python+8

Published

2018-10-31

·

Updated

2024-07-11

·

CVE-2018-20852

CVSS v3.1

5.3

Medium

VectorAV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
Name of the Vulnerable Software and Affected Versions Python versions 2.x through 2.7.16 Python versions 3.x before 3.4.10 Python versions 3.5.x before 3.5.7 Python versions 3.6.x before 3.6.9 Python versions 3.7.x before 3.7.3
Description The issue is related to the incorrect domain validation in the http.cookiejar.DefaultPolicy.domain return ok() function of the Python interpreter. This can be exploited by a remote attacker to gain unauthorized access to protected information. The vulnerability can be abused by using a server with a hostname that has another valid hostname as a suffix, allowing existing cookies to be leaked to the attacker.
Recommendations For Python versions 2.x through 2.7.16, update to a version after 2.7.16 or apply a patch if available. For Python versions 3.x before 3.4.10, update to a version after 3.4.10 or apply a patch if available. For Python versions 3.5.x before 3.5.7, update to a version after 3.5.7 or apply a patch if available. For Python versions 3.6.x before 3.6.9, update to a version after 3.6.9 or apply a patch if available. For Python versions 3.7.x before 3.7.3, update to a version after 3.7.3 or apply a patch if available. As a temporary workaround, consider restricting access to the http.cookiejar.DefaultPolicy.domain return ok() function until a patch is available.

Exploit

Fix

RCE

Found an issue in the description? Have something to add? Feel free to write us 👾

Weakness Enumeration

Related Identifiers

ALSA-2020:1605
ALT-PU-2019-1685
ALT-PU-2019-3103
ALT-PU-2020-3318
BDU:2021-00373
CESA-2020_1131
CESA-2020_1132
CESA-2020_1605
CESA-2020_1764
CVE-2018-20852
DLA-1889-1
DLA-1906-1
DLA-2280-1
DLA-2337-1
OPENSUSE-SU-2019:1988-1
OPENSUSE-SU-2019:1989-1
OPENSUSE-SU-2019_1988-1
OPENSUSE-SU-2019_1989-1
OPENSUSE-SU-2020:0086-1
OPENSUSE-SU-2020_0086-1
OPENSUSE-SU-2024:11202-1
OPENSUSE-SU-2024:11284-1
RHSA-2019:3725
RHSA-2019:3948
RHSA-2020:1131
RHSA-2020:1132
RHSA-2020:1605
RHSA-2020:1764
RHSA-2020_1131
RHSA-2020_1132
RHSA-2020_1605
RHSA-2020_1764
RLSA-2020:1605
SUSE-SU-2019:14142-1
SUSE-SU-2019:14246-1
SUSE-SU-2019:2050-1
SUSE-SU-2019:2091-1
SUSE-SU-2019:2114-1
SUSE-SU-2019:2798-1
SUSE-SU-2019_14142-1
SUSE-SU-2019_14246-1
SUSE-SU-2019_2050-1
SUSE-SU-2019_2091-1
SUSE-SU-2019_2114-1
SUSE-SU-2019_2798-1
SUSE-SU-2020:0114-1
SUSE-SU-2020:0234-1
SUSE-SU-2020:0302-1
SUSE-SU-2020:2699-1
USN-4127-1
USN-4127-2
USN-6891-1

Affected Products

Alt Linux
Almalinux
Centos
Linuxmint
Python
Red Hat
Rocky Linux
Suse
Ubuntu