{"schema_version":"1.9.0","id":"BIT-golang-2023-39318","published":"2024-03-06T10:54:41.909Z","modified":"2026-09-08T08:47:48.441317376Z","aliases":["CVE-2023-39318","GO-2023-2041"],"summary":"Improper handling of HTML-like comments in script contexts in html/template","details":"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":[{"package":{"name":"golang","ecosystem":"Bitnami","purl":"pkg:bitnami/golang"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"1.20.8"},{"introduced":"1.21.0"},{"fixed":"1.21.1"}]}],"database_specific":{"source":"https://github.com/bitnami/vulndb/tree/main/data/golang/BIT-golang-2023-39318.json"},"severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"}]}],"references":[{"type":"FIX","url":"https://go.dev/cl/526156"},{"type":"REPORT","url":"https://go.dev/issue/62196"},{"type":"DISCUSSION","url":"https://groups.google.com/g/golang-dev/c/2C5vbR-UNkI/m/L1hdrPhfBAAJ"},{"type":"ADVISORY","url":"https://pkg.go.dev/vuln/GO-2023-2041"},{"type":"WEB","url":"https://security.gentoo.org/glsa/202311-09"},{"type":"ADVISORY","url":"https://security.netapp.com/advisory/ntap-20231020-0009/"},{"type":"WEB","url":"https://nvd.nist.gov/vuln/detail/CVE-2023-39318"}],"database_specific":{"cpes":["cpe:2.3:a:golang:go:*:*:*:*:*:*:*:*"],"severity":"Medium"}}