Bug 1743129 (CVE-2019-14809) - CVE-2019-14809 golang: malformed hosts in URLs leads to authorization bypass
Summary: CVE-2019-14809 golang: malformed hosts in URLs leads to authorization bypass
Alias: CVE-2019-14809
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
Depends On: 1746232 1743130 1743131 1746231 1746233 1750551 1750552 1750553
Blocks: 1743132
TreeView+ depends on / blocked
Reported: 2019-08-19 07:37 UTC by Dhananjay Arunesh
Modified: 2020-05-19 14:15 UTC (History)
26 users (show)

Fixed In Version: go 1.12.8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2019-11-06 00:53:15 UTC

Attachments (Terms of Use)

System ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2019:3433 None None None 2019-11-05 20:54:31 UTC

Description Dhananjay Arunesh 2019-08-19 07:37:48 UTC
A vulnerability was found in net/url in Go before 1.11.13 and 1.12.x before 1.12.8 mishandles malformed hosts in URLs, leading to an authorization bypass in some applications. This is related to a Host field with a suffix appearing in neither Hostname() nor Port(), and is related to a non-numeric port number. For example, an attacker can compose a crafted javascript:// URL that results in a hostname of google.com.


Upstream commit:

Comment 1 Dhananjay Arunesh 2019-08-19 07:38:07 UTC
Created golang tracking bugs for this issue:

Affects: epel-all [bug 1743130]
Affects: fedora-all [bug 1743131]

Comment 8 Marco Benatto 2019-09-10 15:14:29 UTC
The Go language has an utility which can be used to parse host name strings. The utility can be accessed by calling url.Parse(url) call and returns an object of type URL. This object has two different methods called Hostname() and Port(), those calls returns the hostname itself and the port number from the parsed url string. When url string is malformed the behavior of both calls above are unpredictable sometimes returning unexpected hostname values. An attacker can leverage this bug by crafting specially formatted invalid URL as input to url.Parse(), this will lead url.Hostname() calls to return a host name controlled by the attacker allowing authorization bypass and other consequences depending on how those calls are used.

Comment 9 Marco Benatto 2019-09-10 15:15:14 UTC

This flaw has no mitigation for any affected golang package versions.

Comment 12 errata-xmlrpc 2019-11-05 20:54:29 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

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

Comment 13 Product Security DevOps Team 2019-11-06 00:53:15 UTC
This bug is now closed. Further updates for individual products will be reflected on the CVE page(s):


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