Bug 1718388 (CVE-2019-10160) - CVE-2019-10160 python: regression of CVE-2019-9636 due to functional fix to allow port numbers in netloc
Summary: CVE-2019-10160 python: regression of CVE-2019-9636 due to functional fix to a...
Keywords:
Status: CLOSED ERRATA
Alias: CVE-2019-10160
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
high
high
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
: 1732904 (view as bug list)
Depends On: 1718405 1718868 1718869 1718925 1718401 1718402 1718403 1718406 1718407 1718864 1718865 1718866 1718867 1718924 1726917
Blocks: 1718410
TreeView+ depends on / blocked
 
Reported: 2019-06-07 15:43 UTC by Riccardo Schirone
Modified: 2019-10-03 12:24 UTC (History)
29 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
A security regression of CVE-2019-9636 was discovered in python, since commit d537ab0ff9767ef024f26246899728f0116b1ec3, 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.
Clone Of:
: 1732904 (view as bug list)
Environment:
Last Closed: 2019-07-12 13:07:20 UTC


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2019:1625 None None None 2019-06-27 13:23:27 UTC
Red Hat Product Errata RHBA-2019:2496 None None None 2019-08-19 08:09:11 UTC
Red Hat Product Errata RHSA-2019:1587 None None None 2019-06-20 20:42:39 UTC
Red Hat Product Errata RHSA-2019:1700 None None None 2019-07-08 14:32:43 UTC
Red Hat Product Errata RHSA-2019:2437 None None None 2019-08-12 11:54:29 UTC

Description Riccardo Schirone 2019-06-07 15:43:57 UTC
A security regression for CVE-2019-9636 was discovered in python's functions urllib.parse.urlsplit and urllib.parse.urlparse, introduced with commit d537ab0ff9767ef024f26246899728f0116b1ec3. No upstream python version is affected by this regression but the vulnerable commit may already have been included downstream as part of the original fix for CVE-2019-9636.

Affected python versions ignore the user/password part before `@` in the netloc component of a URL, thus it still allows an attacker to exploit the vulnerability as in CVE-2019-9636. Those functions do not properly handle URLs encoded with Punycode/Internationalizing Domain Names in Applications (IDNA), which may result in a wrong domain name (specifically the netloc component of URL - user@domain:port) being returned by those functions. 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.

External Reference
https://python-security.readthedocs.io/vuln/urlsplit-nfkc-normalization2.html

Vulnerable commit
https://github.com/python/cpython/commit/d537ab0ff9767ef024f26246899728f0116b1ec3

Upstream patch
https://github.com/python/cpython/commit/8d0ef0b5edeae52960c7ed05ae8a12388324f87e

Comment 1 Riccardo Schirone 2019-06-07 15:44:01 UTC
Acknowledgments:

Name: Riccardo Schirone (Red Hat)

Comment 3 Riccardo Schirone 2019-06-07 16:02:45 UTC
The fix for CVE-2019-9636 caused a functional regression reported at [1], which was fixed with [2]. However, commit[2] caused the regression which this flaw is about.

[1] https://bugs.python.org/issue36742
[2] https://github.com/python/cpython/commit/d537ab0ff9767ef024f26246899728f0116b1ec3

Comment 4 Riccardo Schirone 2019-06-07 16:16:51 UTC
External References:

https://python-security.readthedocs.io/vuln/urlsplit-nfkc-normalization2.html

Comment 8 Riccardo Schirone 2019-06-10 12:45:00 UTC
Created python3 tracking bugs for this issue:

Affects: fedora-all [bug 1718866]


Created python34 tracking bugs for this issue:

Affects: epel-all [bug 1718869]
Affects: fedora-all [bug 1718867]


Created python36 tracking bugs for this issue:

Affects: epel-7 [bug 1718865]

Comment 13 Eric Christensen 2019-06-13 13:25:07 UTC
Statement:

This issue did not affect the versions of python as shipped with Red Hat Enterprise Linux 5 and 6 as the security regression was not introduced in those versions. See CVE-2019-9636 for more details about the how these versions of Red Hat Enterprise Linux are affected with regard to the original flaw.

This issue did not affect the versions of python as shipped with Red Hat Enterprise Linux 8 as the security regression was not introduced in those versions. See CVE-2019-9636 for more details about the how these versions of Red Hat Enterprise Linux are affected with regard to the original flaw.

Comment 14 errata-xmlrpc 2019-06-20 20:42:38 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7

Via RHSA-2019:1587 https://access.redhat.com/errata/RHSA-2019:1587

Comment 16 errata-xmlrpc 2019-07-08 14:32:41 UTC
This issue has been addressed in the following products:

  Red Hat Software Collections for Red Hat Enterprise Linux 6
  Red Hat Software Collections for Red Hat Enterprise Linux 7
  Red Hat Software Collections for Red Hat Enterprise Linux 7.4 EUS
  Red Hat Software Collections for Red Hat Enterprise Linux 7.5 EUS
  Red Hat Software Collections for Red Hat Enterprise Linux 7.6 EUS

Via RHSA-2019:1700 https://access.redhat.com/errata/RHSA-2019:1700

Comment 17 Product Security DevOps Team 2019-07-12 13:07:20 UTC
This bug is now closed. Further updates for individual products will be reflected on the CVE page(s):

https://access.redhat.com/security/cve/cve-2019-10160

Comment 18 errata-xmlrpc 2019-08-12 11:54:27 UTC
This issue has been addressed in the following products:

  Red Hat Virtualization 4 for Red Hat Enterprise Linux 7

Via RHSA-2019:2437 https://access.redhat.com/errata/RHSA-2019:2437

Comment 19 Yorgos Saslis 2019-09-25 18:11:19 UTC
*** Bug 1732904 has been marked as a duplicate of this bug. ***


Note You need to log in before you can comment on or make changes to this bug.