CVE-2020-24553
JSON

6.1medium

Cross-site scripting in net/http/cgi and net/http/fcgi

Severity
6.1medium CVSS:3.1 by NVD
Exploit likelihood
3.65% (higher than 89% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
mitre
Also known as
GO-2021-0226BIT-GOLANG-2020-24553

Description

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.

Affected

Product or packageVersionsReported by
Unspecified productn/aCVE List
stdlib (Go)before 1.14.8, from 1.15.0-0 before 1.15.1Go Vulnerability Database
golang gobefore 1.14.8, from 1.15.0 before 1.15.1NVD
fedoraproject fedora33NVD
opensuse leap15.1, 15.2NVD
oracle communications_cloud_native_core_policy1.5.0NVD
golang (Bitnami)before 1.14.8, from 1.15.0 before 1.15.1Bitnami Vulnerability Database

All scores

NVD6.1medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
NVD4.3medium CVSS:2.0AV:N/AC:M/Au:N/C:N/I:P/A:N
Bitnami Vulnerability Databasemedium rating

Classification

What each source says

CVE List

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 Vulnerability Database

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.

NVD (es)

Go versiones anteriores a 1.14.8 y versiones 1.15.x anteriores a 1.15.1, permite un ataque de tipo XSS porque text/html es el predeterminado para los manejadores de CGI/FCGI que carecen de un encabezado Content-Type

References

http://seclists.org/fulldisclosure/2020/Sep/5advisory, exploit, mailing-list, third-party-advisory
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/CZBO7Q73GGWBVYIKNH2HNN44Q5IQND5W/vendor-advisory, web
http://lists.opensuse.org/opensuse-security-announce/2020-10/msg00000.htmladvisory, mailing-list, third-party-advisory, vendor-advisory
http://lists.opensuse.org/opensuse-security-announce/2020-10/msg00002.htmladvisory, mailing-list, third-party-advisory, vendor-advisory
https://www.oracle.com/security-alerts/cpuApr2021.htmladvisory, patch, third-party-advisory
https://groups.google.com/forum/#%21topic/golang-announce/8wqlSbkLdPsweb
http://packetstormsecurity.com/files/159049/Go-CGI-FastCGI-Transport-Cross-Site-Scripting.htmladvisory, exploit, third-party-advisory, vdb-entry
https://security.netapp.com/advisory/ntap-20200924-0003/advisory, third-party-advisory
https://www.oracle.com//security-alerts/cpujul2021.htmladvisory, patch, third-party-advisory
https://www.redteam-pentesting.de/advisories/rt-sa-2020-004advisory, exploit, third-party-advisory
https://go.dev/cl/252179fix
https://go.googlesource.com/go/+/4f5cd0c0331943c7ec72df3b827d972584f77833fix

Sources

SourceRecordLicence
CVE ListCVE-2020-24553 changed 2024-08-04CVE Terms of Use
Go Vulnerability DatabaseGO-2021-0226 changed 2024-05-20CC-BY-4.0
NVDCVE-2020-24553 changed 2026-06-17Public domain
Bitnami Vulnerability DatabaseBIT-GOLANG-2020-24553 changed 2026-09-08Apache-2.0