CVE-2023-39318
MEDIUM6.1EPSS 0.09%Improper handling of HTML-like comments in script contexts in html/template
Published: 9/7/2023Modified: 4/28/2026
Description
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.
Affected packages (4)
- Bitnami/golangfrom 0, < 1.20.8, >= 1.21.0, < 1.21.1
- Debian/golang-1.15from 0
- Debian/golang-1.19from 0
- Go/stdlibfrom 0, < 1.20.8, >= 1.21.0-0, < 1.21.1
CVSS scores
| Source | Version | Severity | Vector |
|---|---|---|---|
| osv | CVSS 3.1 | MEDIUM6.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
References (8)
- ADVISORYhttps://security-tracker.debian.org/tracker/CVE-2023-39318
- PATCHhttps://go.dev/cl/526156
- REPORThttps://go.dev/issue/62196
- WEBhttps://groups.google.com/g/golang-dev/c/2C5vbR-UNkI/m/L1hdrPhfBAAJ
- WEBhttps://nvd.nist.gov/vuln/detail/CVE-2023-39318
- WEBhttps://pkg.go.dev/vuln/GO-2023-2041
- WEBhttps://security.gentoo.org/glsa/202311-09
- WEBhttps://security.netapp.com/advisory/ntap-20231020-0009/