{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2023-39318","id":"CVE-2023-39318","title":"Improper handling of HTML-like comments in script contexts in html/template","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.","descriptionLong":"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.","published":"2023-09-08T16:13:24.063Z","updated":"2026-10-28T02:31:06.995771756Z","reserved":"2023-07-27T17:05:55.186Z","status":"Modified","rejected":false,"assigner":"Go","metric":{"version":"3.1","score":6.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","rating":"medium","source":"NVD"},"metrics":[{"version":"3.1","score":6.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","rating":"medium","source":"NVD"}],"rating":"medium","products":["Go standard library html/template"],"affectedProducts":[{"vendor":"Go standard library","product":"html/template","defaultStatus":"unaffected","versions":[{"version":"0","lessThan":"1.20.8","status":"affected","versionType":"semver"},{"version":"1.21.0-0","lessThan":"1.21.1","status":"affected","versionType":"semver"}],"platforms":[]}],"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"],"advisory":"GO-2023-2041"}],"cwes":["CWE-79"],"aliases":["BIT-golang-2023-39318","GO-2023-2041"],"references":[{"url":"https://go.dev/issue/62196","tags":["x_transferred","Issue Tracking","web","report"]},{"url":"https://go.dev/cl/526156","tags":["x_transferred","Patch","web","fix"]},{"url":"https://groups.google.com/g/golang-dev/c/2C5vbR-UNkI/m/L1hdrPhfBAAJ","tags":["x_transferred","Mailing List","Release Notes","web"]},{"url":"https://pkg.go.dev/vuln/GO-2023-2041","tags":["x_transferred","Vendor Advisory","web"]},{"url":"https://security.netapp.com/advisory/ntap-20231020-0009/","tags":["x_transferred","Third Party Advisory","advisory"]},{"url":"https://security.gentoo.org/glsa/202311-09","tags":["x_transferred","advisory"]},{"url":"https://pkg.go.dev","tags":["web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/39xxx/CVE-2023-39318.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2023-39318","tags":["advisory"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial"},"epss":0.0093,"epssPercentile":0.6135,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2023-39318","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2023-39318","ok":true,"note":"Modified"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2023-39318","ok":true,"note":"1 package"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2023-39318","ok":true,"note":"scored 2026-11-19"}],"aiTitle":false,"tech":["go"],"critical":[],"attention":null}