{"id":"CVE-2023-39319","published":"2023-09-08T16:13:28Z","modified":"2025-02-13T17:02:47Z","title":"Improper handling of special tags within script contexts in html/template","vendor":"Go standard library","product":"html/template","tier":"tail","description":{"text":"The html/template package does not apply the proper rules for handling occurrences of \"<script\", \"<!--\", and \"</script\" within JS literals in <script> contexts. This may cause the template parser to improperly consider script contexts to be terminated early, causing actions to be improperly escaped. This could 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/62197","tags":[]},{"url":"https://go.dev/cl/526157","tags":[]},{"url":"https://groups.google.com/g/golang-dev/c/2C5vbR-UNkI/m/L1hdrPhfBAAJ","tags":[]},{"url":"https://pkg.go.dev/vuln/GO-2023-2043","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:49.339620Z","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-2043"],"provenance":"source"}],"summary":{"text":"The html/template package in the Go standard library mishandles the sequences \"<script\", \"<!--\", and \"</script\" appearing within JavaScript literals inside script contexts. This can cause the parser to treat a script context as ended early, so template actions are escaped incorrectly. An attacker could leverage this to perform cross-site scripting.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:03:02Z"},"euvd":{"id":"EUVD-2023-43051","exploited":false,"provenance":"source"},"lineage":{"packageHistory":[{"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-39319","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}],"package":"Go:stdlib"}}