XSS in Golang Go
CVE-2023-39318
The html/template package does not properly handle HTML-like "" comment tokens, nor hashbang "#!" comment tokens, in <script> contexts. This may cause the template parser to improperly interpret the contents of <script> contexts, causing actions to be improperly escaped. This may be leveraged to perform an XSS attack.
Vulnerability class: XSS (Cross-Site Scripting)
Published · last modified .
CVSS v3 metric
CVSS v3 base score 6.1 (Medium). Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N.
EPSS exploit prediction
EPSS 0.009, 61.1th percentile (scored ); unchanged over 30 days. About EPSS.
Affected products
- Golang Go
- Go Standard Library Html/template — versions 0, 1.21.0-0
Weakness classification (CWE)
Public exploits and proof-of-concept code
Also mentioned in 5 other repositories (8-cm/kube-dump, ARPSyndicate/cve-scores, drewtwitchell/scancompare, …). These reference the CVE in a list, notes or a scanner and are not exploit code for it.
References
- go.dev/issue/62196 (Issue Tracking)
- go.dev/cl/526156 (Patch)
- groups.google.com/g/golang-dev/c/2C5vbR-UNkI/m/L1hdrPhfBAAJ (Mailing List, Release Notes)
- pkg.go.dev/vuln/GO-2023-2041 (Vendor Advisory)
- security.netapp.com/advisory/ntap-20231020-0009/ (Third Party Advisory)
- security.gentoo.org/glsa/202311-09