CVE-2023-39318Improper handling of HTML-like comments in script contexts in html/template
- 6.1MediumCVSS base score
- 0.93%Exploitation in 30 daysEPSS · top 39% of all CVEs
- NoKnown exploitednot in CISA's KEV catalog
- NonePublic exploitsnone known yet
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.
Timeline
ID reserved
By Go
- 43 days later
· 43 days later
Published
- 17 months later
· 17 months later
Record updated
Changes after publication (a new score, a public exploit, EPSS crossing 1, 10 or 50 %, leaving KEV) are kept since November 2026; earlier ones are not known.
Scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| NVDNVD · Modified | 3.1 | Medium6.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
- EPSS (exploitation in 30 days)
- 0.93% · top 39% of all CVEs (17 Nov 2026)
- CISA SSVC
- Exploitation: none · Automatable: no · Technical impact: partial
The list uses the assigner's score when there is one, then CISA's, then NVD's: Medium 6.1.
Affected products
Go standard library · html/template
- affected < 1.20.8
- affected 1.21.0-0 – < 1.21.1
References
References6
- https://go.dev/issue/62196 (opens in a new tab)x_transferred
- https://go.dev/cl/526156 (opens in a new tab)x_transferred
- https://groups.google.com/g/golang-dev/c/2C5vbR-UNkI/m/L1hdrPhfBAAJ (opens in a new tab)x_transferred
- https://pkg.go.dev/vuln/GO-2023-2041 (opens in a new tab)x_transferred
- https://security.netapp.com/advisory/ntap-20231020-0009/ (opens in a new tab)x_transferred
- https://security.gentoo.org/glsa/202311-09 (opens in a new tab)x_transferred
Sources
The same CVE in the primary databases and aggregators, to check against.
- CVE.org record (opens in a new tab)
- CVE List JSON (GitHub) (opens in a new tab)
- NVD (opens in a new tab)
- FIRST EPSS (opens in a new tab)
- EUVD EUVD-2023-43050 (opens in a new tab)
- OSV.dev (opens in a new tab)
- GitHub Advisories (opens in a new tab)
- CIRCL Vulnerability-Lookup (opens in a new tab)
Badge for a README or a ticket
[](https://cveledger.app/cve/CVE-2023-39318)Record last updated .