CVE-2020-24553
Go before 1.14.8 and 1.15.x before 1.15.1 allows XSS because text/html is the default for CGI/FCGI handlers that lack a Content-Type header.
02 / AFFECTED SOFTWARE
Affected packages
142 explicit affected versions
03 / CONNECTIONS
Connected vulnerabilities
04 / EVIDENCE
Source records
Go before 1.14.8 and 1.15.x before 1.15.1 allows XSS because text/html is the default for CGI/FCGI handlers that lack a Content-Type header.
Go before 1.14.8 and 1.15.x before 1.15.1 allows XSS because text/html is the default for CGI/FCGI handlers that lack a Content-Type header.
When a Handler does not explicitly set the Content-Type header, the the package 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. The Content-Type header is now set based on the contents of the first Write using http.DetectContentType, which is consistent with the behavior of the net/http package. Although this protects some applications that validate the contents of uploaded files, not setting the Content-Type header explicitly on any attacker-controlled file is unsafe and should be avoided.
05 / REFERENCES
Further evidence
- http://lists.opensuse.org/opensuse-security-announce/2020-10/msg00000.html
- http://lists.opensuse.org/opensuse-security-announce/2020-10/msg00002.html
- http://packetstormsecurity.com/files/159049/Go-CGI-FastCGI-Transport-Cross-Site-Scripting.html
- http://seclists.org/fulldisclosure/2020/Sep/5
- https://groups.google.com/forum/#%21topic/golang-announce/8wqlSbkLdPs
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/CZBO7Q73GGWBVYIKNH2HNN44Q5IQND5W/
- https://security.netapp.com/advisory/ntap-20200924-0003/
- https://www.oracle.com//security-alerts/cpujul2021.html
- https://www.oracle.com/security-alerts/cpuApr2021.html
- https://www.redteam-pentesting.de/advisories/rt-sa-2020-004
- https://nvd.nist.gov/vuln/detail/CVE-2020-24553
- https://go.dev/cl/252179
- https://go.dev/issue/40928
- https://go.googlesource.com/go/+/4f5cd0c0331943c7ec72df3b827d972584f77833
- https://groups.google.com/g/golang-announce/c/8wqlSbkLdPs