Bug 1874857 (CVE-2020-24553) - CVE-2020-24553 golang: default Content-Type setting in net/http/cgi and net/http/fcgi could cause XSS
Summary: CVE-2020-24553 golang: default Content-Type setting in net/http/cgi and net/h...
Keywords:
Status: NEW
Alias: CVE-2020-24553
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 1875786 1877800 1877828 1874858 1874859 1875785 1877801 1877802
Blocks: 1874860
TreeView+ depends on / blocked
 
Reported: 2020-09-02 12:51 UTC by Marian Rehak
Modified: 2020-10-07 02:27 UTC (History)
71 users (show)

Fixed In Version: go 1.15.1, go 1.14.8
Doc Type: If docs needed, set a value
Doc Text:
A flaw was found in Go standard library packages before upstream versions 1.15 and 1.14.8. Both the net/http/cgi and net/http/fcgi packages use a default Content-Type response header value of "text/html", rather than "text/plain". An attacker could exploit this in applications using these packages by uploading crafted files, allowing for a cross-site scripting attack (XSS).
Clone Of:
Environment:
Last Closed:


Attachments (Terms of Use)

Description Marian Rehak 2020-09-02 12:51:40 UTC
In Go versions prior to 1.15.1 and 1.14.8 if the Content-Type header of a Handler was not explicitly set the net/http/cgi and net/http/fcgi packages would default to “text/html”, which could cause a Cross-Site Scripting vulnerability if an attacker can control any part of the contents of a response.

Upstream Reference:

https://groups.google.com/g/golang-announce/c/8wqlSbkLdPs/m/UccMwBPUBAAJ?pli=1

Comment 1 Marian Rehak 2020-09-02 12:52:09 UTC
Created golang tracking bugs for this issue:

Affects: epel-all [bug 1874859]
Affects: fedora-all [bug 1874858]

Comment 7 Sam Fowler 2020-09-07 07:28:10 UTC
Upstream Patch:

https://go-review.googlesource.com/c/go/+/252179/

Comment 9 Sam Fowler 2020-09-08 09:15:05 UTC
Statement:

Multiple components in Red Hat OpenShift Container Platform are built with Go and use net/http, however none include the specific vulnerable packages net/http/cgi and net/http/fcgi. Red Hat OpenShift Container Platform is not affected by this flaw.


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