{"id":"CVE-2023-39318","published":"2023-09-08T16:13:24Z","modified":"2025-02-13T17:02:46Z","title":"Improper handling of HTML-like comments in script contexts in html/template","vendor":"Go standard library","product":"html/template","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":null,"epss":{"score":0.00955,"percentile":0.59945,"provenance":"source"},"cwes":[],"references":[{"url":"https://go.dev/issue/62196","tags":[]},{"url":"https://go.dev/cl/526156","tags":[]},{"url":"https://groups.google.com/g/golang-dev/c/2C5vbR-UNkI/m/L1hdrPhfBAAJ","tags":[]},{"url":"https://pkg.go.dev/vuln/GO-2023-2041","tags":[]},{"url":"https://security.netapp.com/advisory/ntap-20231020-0009/","tags":[]},{"url":"https://security.gentoo.org/glsa/202311-09","tags":[]}],"priority":{"score":12.0,"factors":[{"name":"EPSS percentile","points":11.99}]},"vendorSlug":"go-standard-library","affectedVersions":[{"vendor":"Go standard library","product":"html/template","versions":["< 1.20.8",">= 1.21.0-0, < 1.21.1"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2024-09-26T16:02:51.219482Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"Go","package":"stdlib","vulnerableRanges":["<1.20.8",">=1.21.0-0, <1.21.1"],"patched":["1.20.8","1.21.1"],"from":["GO-2023-2041"],"provenance":"source"}],"summary":{"text":"The html/template package in the Go standard library mishandles HTML-like \"<!--\" comment tokens and hashbang \"#!\" comment tokens inside <script> contexts.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:01:55Z"},"euvd":{"id":"EUVD-2023-43050","exploited":false,"provenance":"source"},"lineage":{"packageHistory":[{"cve":"CVE-2023-29403","published":"2023-06-08","fixed":"1.20.5","kev":false},{"cve":"CVE-2023-29406","published":"2023-07-11","fixed":"1.20.6","kev":false},{"cve":"CVE-2023-29409","published":"2023-08-02","fixed":"1.21.0-rc.4","kev":false,"link":{"from":"CVE-2023-29409","to":"CVE-2023-39318","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"Go:stdlib","fromFixed":"1.20.7","toFixed":"1.20.8","daysApart":37}]}},{"cve":"CVE-2023-39318","published":"2023-09-08","fixed":"1.21.1","kev":false},{"cve":"CVE-2023-39319","published":"2023-09-08","fixed":"1.21.1","kev":false},{"cve":"CVE-2023-39321","published":"2023-09-08","fixed":"1.21.1","kev":false},{"cve":"CVE-2023-39322","published":"2023-09-08","fixed":"1.21.1","kev":false},{"cve":"CVE-2023-39325","published":"2023-10-11","fixed":"1.21.3","kev":false,"link":{"from":"CVE-2023-39318","to":"CVE-2023-39325","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"Go:stdlib","fromFixed":"1.20.8","toFixed":"1.20.10","daysApart":33}]}}],"package":"Go:stdlib"}}