{"cve":"CVE-2023-39318","nvd":{"published":"2023-09-08T17:15:27.823","modified":"2026-06-17T06:12:01.240","status":"Modified","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.","cvss_v4":null,"cvss_v3":{"version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":6.1},"cwes":["CWE-79"],"references":["https://go.dev/cl/526156","https://go.dev/issue/62196","https://groups.google.com/g/golang-dev/c/2C5vbR-UNkI/m/L1hdrPhfBAAJ","https://pkg.go.dev/vuln/GO-2023-2041","https://security.gentoo.org/glsa/202311-09"],"products":["golang:go"],"source":"nvd","synced_at":"2026-10-19T21:39:24.235896374+00:00"},"epss":{"cve":"CVE-2023-39318","score":0.0093,"percentile":0.60602,"date":"2026-10-31"},"kev":null,"osv":[{"id":"GO-2023-2041","url":"https://osv.dev/vulnerability/GO-2023-2041","summary":"Improper handling of HTML-like comments in script contexts in html/template","modified":"2026-02-04T04:25:22.510281Z","packages":[{"ecosystem":"Go","name":"stdlib","purl":"pkg:golang/stdlib","ranges":["<1.20.8",">=1.21.0-0 <1.21.1"],"fixed":["1.20.8","1.21.1"]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}