Bug 1874857 (CVE-2020-24553)

Summary: CVE-2020-24553 golang: default Content-Type setting in net/http/cgi and net/http/fcgi could cause XSS
Product: [Other] Security Response Reporter: Marian Rehak <mrehak>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: abonas, admiller, alegrand, alitke, amurdaca, anpicker, aos-bugs, aos-storage-staff, asm, bbennett, bbreard, bbrownin, bmontgom, bodavis, bthurber, cnv-qe-bugs, deparker, dwalsh, emachado, eparis, erooth, fdeutsch, fweimer, gbrown, hchiramm, hvyas, imcleod, jakub, jburrell, jcajka, jesusr, jligon, jmulligan, jokerman, jpadman, jwon, kakkoyun, kconner, krathod, ksimon, law, lcosic, lemenkov, madam, markito, miabbott, mloibl, mnewsome, mpolacek, nstielau, ohudlick, phoracek, pkrupa, puebele, rcernich, renich, rhs-bugs, rphillips, rrajasek, rtalur, sgott, shurley, sponnaga, stirabos, storage-qa-internal, surbania, tjelinek, tstellar, tsweeney, vbatts
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
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 the 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". This flaw allows an attacker to exploit this issue in applications using these packages by uploading crafted files, allowing a Cross-site Scripting attack (XSS). The highest threat from this vulnerability is to confidentiality and integrity.
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-12-15 22:18:50 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1874858, 1874859, 1875785, 1875786, 1877800, 1877801, 1877802, 1877828, 1897181    
Bug Blocks: 1874860    

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.

Comment 15 errata-xmlrpc 2020-12-15 17:06:19 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

Via RHSA-2020:5493 https://access.redhat.com/errata/RHSA-2020:5493

Comment 16 Product Security DevOps Team 2020-12-15 22:18:50 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-2020-24553

Comment 17 errata-xmlrpc 2021-01-14 13:38:53 UTC
This issue has been addressed in the following products:

  Openshift Serverless 1 on RHEL 8

Via RHSA-2021:0145 https://access.redhat.com/errata/RHSA-2021:0145

Comment 18 errata-xmlrpc 2021-01-14 16:31:18 UTC
This issue has been addressed in the following products:

  Openshift Serveless 1.12

Via RHSA-2021:0146 https://access.redhat.com/errata/RHSA-2021:0146