Bug 1732904 - 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 DUPLICATE of bug 1718388
Alias: None
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-07-24 16:35 UTC by Yorgos Saslis
Modified: 2019-09-29 15:18 UTC (History)
31 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: CVE-2019-10160
Environment:
Last Closed: 2019-09-25 18:11:19 UTC
Embargoed:


Attachments (Terms of Use)

Description Yorgos Saslis 2019-07-24 16:35:22 UTC
+++ This bug was initially created as a clone of Bug #1718388 to be used as a tracking bug for 3scale errata +++

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

--- Additional comment from Riccardo Schirone on 2019-06-07 15:44:01 UTC ---

Acknowledgments:

Name: Riccardo Schirone (Red Hat)

--- Additional comment from Riccardo Schirone on 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

--- Additional comment from Riccardo Schirone on 2019-06-07 16:16:51 UTC ---

External References:

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

--- Additional comment from Riccardo Schirone on 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]

--- Additional comment from Eric Christensen on 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.

--- Additional comment from errata-xmlrpc on 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

--- Additional comment from errata-xmlrpc on 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

--- Additional comment from Product Security DevOps Team on 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 1 Marian Rehak 2019-09-25 14:26:36 UTC
Hello,

May I ask why was this cloned as we already have a bz for it?
https://bugzilla.redhat.com/show_bug.cgi?id=1718388
This is clearly a duplicate.

Comment 2 Yorgos Saslis 2019-09-25 18:11:19 UTC
Yes, apologies for this Marian - I was trying to figure out how to create an RHSA for a CVE. 

Please ignore this.

*** This bug has been marked as a duplicate of bug 1718388 ***


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