CVE Vulnerabilities

CVE-2019-10160

Encoding Error

Published: Jun 07, 2019 | Modified: Feb 12, 2023
CVSS 3.x
9.8
CRITICAL
Source:
NVD
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
CVSS 2.x
5 MEDIUM
AV:N/AC:L/Au:N/C:P/I:N/A:N
RedHat/V2
RedHat/V3
9.8 IMPORTANT
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Ubuntu
MEDIUM

A security regression of CVE-2019-9636 was discovered in python since commit d537ab0ff9767ef024f26246899728f0116b1ec3 affecting versions 2.7, 3.5, 3.6, 3.7 and from v3.8.0a4 through v3.8.0b1, which still allows an attacker to exploit CVE-2019-9636 by abusing the user and password parts of a URL. When an application parses user-supplied URLs to store cookies, authentication credentials, or other kind of information, it is possible for an attacker to provide specially crafted URLs to make the application locate host-related information (e.g. cookies, authentication data) and send them to a different host than where it should, unlike if the URLs had been correctly parsed. The result of an attack may vary based on the application.

Weakness

The product does not properly encode or decode the data, resulting in unexpected values.

Affected Software

Name Vendor Start Version End Version
Python Python 2.7.0 (including) 2.7.17 (excluding)
Python Python 3.5.0 (including) 3.5.8 (excluding)
Python Python 3.6.0 (including) 3.6.9 (excluding)
Python Python 3.7.0 (including) 3.7.4 (excluding)
Python Python 3.8.0-alpha4 (including) 3.8.0-alpha4 (including)
Python Python 3.8.0-beta1 (including) 3.8.0-beta1 (including)
Red Hat Enterprise Linux 7 RedHat python-0:2.7.5-80.el7_6 *
Red Hat Software Collections for Red Hat Enterprise Linux 6 RedHat python27-python-0:2.7.16-6.el6 *
Red Hat Software Collections for Red Hat Enterprise Linux 7 RedHat python27-python-0:2.7.16-6.el7 *
Red Hat Software Collections for Red Hat Enterprise Linux 7.4 EUS RedHat python27-python-0:2.7.16-6.el7 *
Red Hat Software Collections for Red Hat Enterprise Linux 7.5 EUS RedHat python27-python-0:2.7.16-6.el7 *
Red Hat Software Collections for Red Hat Enterprise Linux 7.6 EUS RedHat python27-python-0:2.7.16-6.el7 *
Red Hat Virtualization 4 for Red Hat Enterprise Linux 7 RedHat imgbased-0:1.1.9-0.1.el7ev *
Red Hat Virtualization 4 for Red Hat Enterprise Linux 7 RedHat ovirt-node-ng-0:4.3.5-0.20190717.0.el7ev *
Red Hat Virtualization 4 for Red Hat Enterprise Linux 7 RedHat redhat-release-virtualization-host-0:4.3.5-2.el7ev *
Red Hat Virtualization 4 for Red Hat Enterprise Linux 7 RedHat redhat-virtualization-host-0:4.3.5-20190722.0.el7_7 *
Python2.7 Ubuntu bionic *
Python2.7 Ubuntu cosmic *
Python2.7 Ubuntu disco *
Python2.7 Ubuntu trusty *
Python2.7 Ubuntu trusty/esm *
Python2.7 Ubuntu xenial *
Python3.4 Ubuntu trusty *
Python3.4 Ubuntu trusty/esm *
Python3.5 Ubuntu trusty *
Python3.5 Ubuntu trusty/esm *
Python3.5 Ubuntu xenial *
Python3.6 Ubuntu bionic *
Python3.6 Ubuntu cosmic *
Python3.6 Ubuntu trusty *
Python3.7 Ubuntu bionic *
Python3.7 Ubuntu cosmic *
Python3.7 Ubuntu disco *
Python3.7 Ubuntu trusty *

Potential Mitigations

  • Assume all input is malicious. Use an “accept known good” input validation strategy, i.e., use a list of acceptable inputs that strictly conform to specifications. Reject any input that does not strictly conform to specifications, or transform it into something that does.
  • When performing input validation, consider all potentially relevant properties, including length, type of input, the full range of acceptable values, missing or extra inputs, syntax, consistency across related fields, and conformance to business rules. As an example of business rule logic, “boat” may be syntactically valid because it only contains alphanumeric characters, but it is not valid if the input is only expected to contain colors such as “red” or “blue.”
  • Do not rely exclusively on looking for malicious or malformed inputs. This is likely to miss at least one undesirable input, especially if the code’s environment changes. This can give attackers enough room to bypass the intended validation. However, denylists can be useful for detecting potential attacks or determining which inputs are so malformed that they should be rejected outright.

References