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)
EPSS: 0.008 (53.4th percentile) — read the EPSS interpretation.
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.
Affected products
- Golang Go
- Go Standard Library Html/template — versions 0, 1.21.0-0
Weakness classification (CWE)
Public proof-of-concept exploits
References
- security@golang.org (Issue Tracking)
- security@golang.org (Patch)
- security@golang.org (Mailing List, Release Notes)
- security@golang.org (Vendor Advisory)
- security@golang.org (Third Party Advisory)
- security@golang.org
Frequently asked questions
- What is CVE-2023-39318?
- CVE-2023-39318 is a medium-severity vulnerability in Golang Go, classified under Cross-site Scripting. CVSS score: 6.1/10. Published 2023-09-08.
- How severe is CVE-2023-39318?
- Medium severity. CVSS v3 base score is 6.1 out of 10.
- Is CVE-2023-39318 known to be exploited?
- 5 public proof-of-concept repositories are indexed. Not currently listed in the CISA KEV catalog.