{"api_version":"1","generated_at":"2026-04-22T21:02:48+00:00","cve":"CVE-2023-39318","urls":{"html":"https://cve.report/CVE-2023-39318","api":"https://cve.report/api/cve/CVE-2023-39318.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2023-39318","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2023-39318"},"summary":{"title":"CVE-2023-39318","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.","state":"PUBLIC","assigner":"security@golang.org","published_at":"2023-09-08 17:15:00","updated_at":"2023-11-07 04:17:00"},"problem_types":["CWE-79"],"metrics":[],"references":[{"url":"https://security.netapp.com/advisory/ntap-20231020-0009/","name":"https://security.netapp.com/advisory/ntap-20231020-0009/","refsource":"MISC","tags":[],"title":"September 2023 Golang Vulnerabilities in NetApp Products | NetApp Product Security","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://groups.google.com/g/golang-dev/c/2C5vbR-UNkI/m/L1hdrPhfBAAJ","name":"https://groups.google.com/g/golang-dev/c/2C5vbR-UNkI/m/L1hdrPhfBAAJ","refsource":"MISC","tags":[],"title":"[security] Go 1.21.1 and Go 1.20.8 are released","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://go.dev/issue/62196","name":"https://go.dev/issue/62196","refsource":"MISC","tags":[],"title":"html/template: improper handling of HTML-like comments within script contexts (CVE-2023-39318) · Issue #62196 · golang/go · GitHub","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://pkg.go.dev/vuln/GO-2023-2041","name":"https://pkg.go.dev/vuln/GO-2023-2041","refsource":"MISC","tags":[],"title":"GO-2023-2041 - Go Packages","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://go.dev/cl/526156","name":"https://go.dev/cl/526156","refsource":"MISC","tags":[],"title":"","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://www.cve.org/CVERecord?id=CVE-2023-39318","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2023-39318","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[{"cve_year":"2023","cve_id":"39318","vulnerable":"1","versionEndIncluding":"","cpe1":"cpe","cpe2":"2.3","cpe3":"a","cpe4":"golang","cpe5":"go","cpe6":"*","cpe7":"*","cpe8":"*","cpe9":"*","cpe10":"*","cpe11":"*","cpe12":"*","cpe13":"*"}],"vendor_comments":[],"enrichments":{"kev":null,"epss":null,"legacy_qids":[{"cve":"CVE-2023-39318","qid":"161230","title":"Oracle Enterprise Linux Security Update for podman (ELSA-2023-7765)"},{"cve":"CVE-2023-39318","qid":"161231","title":"Oracle Enterprise Linux Security Update for containernetworking-plugins (ELSA-2023-7766)"},{"cve":"CVE-2023-39318","qid":"161243","title":"Oracle Enterprise Linux Security Update for skopeo (ELSA-2023-7762)"},{"cve":"CVE-2023-39318","qid":"161244","title":"Oracle Enterprise Linux Security Update for buildah (ELSA-2023-7764)"},{"cve":"CVE-2023-39318","qid":"161289","title":"Oracle Enterprise Linux Security Update for container-tools:4.0 (ELSA-2024-0121)"},{"cve":"CVE-2023-39318","qid":"200040","title":"Ubuntu Security Notification for Go Vulnerabilities (USN-6574-1)"},{"cve":"CVE-2023-39318","qid":"242374","title":"Red Hat OpenShift Container Platform 4.14 Security Update (RHSA-2023:5009)"},{"cve":"CVE-2023-39318","qid":"242464","title":"Red Hat OpenShift Container Platform 4.14 Security Update (RHSA-2023:6840)"},{"cve":"CVE-2023-39318","qid":"242569","title":"Red Hat Update for podman (RHSA-2023:7765)"},{"cve":"CVE-2023-39318","qid":"242585","title":"Red Hat Update for containernetworking-plugins (RHSA-2023:7766)"},{"cve":"CVE-2023-39318","qid":"242587","title":"Red Hat Update for buildah (RHSA-2023:7764)"},{"cve":"CVE-2023-39318","qid":"242593","title":"Red Hat Update for skopeo (RHSA-2023:7762)"},{"cve":"CVE-2023-39318","qid":"242882","title":"Red Hat Update for container-tools:4.0 (RHSA-2024:0121)"},{"cve":"CVE-2023-39318","qid":"296105","title":"Oracle Solaris 11.4 Support Repository Update (SRU) 63.157.1 Missing (CPUOCT2023)"},{"cve":"CVE-2023-39318","qid":"356376","title":"Amazon Linux Security Advisory for golang : ALAS2023-2023-367"},{"cve":"CVE-2023-39318","qid":"506086","title":"Alpine Linux Security Update for go"},{"cve":"CVE-2023-39318","qid":"673519","title":"EulerOS Security Update for golang (EulerOS-SA-2023-3270)"},{"cve":"CVE-2023-39318","qid":"673747","title":"EulerOS Security Update for golang (EulerOS-SA-2023-3178)"},{"cve":"CVE-2023-39318","qid":"673945","title":"EulerOS Security Update for golang (EulerOS-SA-2023-3213)"},{"cve":"CVE-2023-39318","qid":"673979","title":"EulerOS Security Update for golang (EulerOS-SA-2023-3299)"},{"cve":"CVE-2023-39318","qid":"673988","title":"EulerOS Security Update for golang (EulerOS-SA-2023-3331)"},{"cve":"CVE-2023-39318","qid":"674107","title":"EulerOS Security Update for golang (EulerOS-SA-2023-3242)"},{"cve":"CVE-2023-39318","qid":"710791","title":"Gentoo Linux Go Multiple Vulnerabilities (GLSA 202311-09)"},{"cve":"CVE-2023-39318","qid":"754886","title":"SUSE Enterprise Linux Security Update for go1.21 (SUSE-SU-2023:3701-1)"},{"cve":"CVE-2023-39318","qid":"754887","title":"SUSE Enterprise Linux Security Update for go1.20 (SUSE-SU-2023:3700-1)"},{"cve":"CVE-2023-39318","qid":"754951","title":"SUSE Enterprise Linux Security Update for go1.20-openssl (SUSE-SU-2023:3840-1)"},{"cve":"CVE-2023-39318","qid":"755275","title":"SUSE Enterprise Linux Security Update for go1.21-openssl (SUSE-SU-2023:4469-1)"},{"cve":"CVE-2023-39318","qid":"770213","title":"Red Hat OpenShift Container Platform 4.14 Security Update (RHSA-2023:5009)"},{"cve":"CVE-2023-39318","qid":"770214","title":"Red Hat OpenShift Container Platform 4.14 Security Update (RHSA-2023:6840)"},{"cve":"CVE-2023-39318","qid":"907882","title":"Common Base Linux Mariner (CBL-Mariner) Security Update for msft-golang (28832-1)"},{"cve":"CVE-2023-39318","qid":"907896","title":"Common Base Linux Mariner (CBL-Mariner) Security Update for golang (28694-2)"},{"cve":"CVE-2023-39318","qid":"941495","title":"AlmaLinux Security Update for podman (ALSA-2023:7765)"},{"cve":"CVE-2023-39318","qid":"941498","title":"AlmaLinux Security Update for containernetworking-plugins (ALSA-2023:7766)"},{"cve":"CVE-2023-39318","qid":"941499","title":"AlmaLinux Security Update for skopeo (ALSA-2023:7762)"},{"cve":"CVE-2023-39318","qid":"941500","title":"AlmaLinux Security Update for buildah (ALSA-2023:7764)"},{"cve":"CVE-2023-39318","qid":"941535","title":"AlmaLinux Security Update for container-tools:4.0 (ALSA-2024:0121)"}]},"source_records":{"cve_program":{"data_version":"4.0","data_type":"CVE","data_format":"MITRE","CVE_data_meta":{"ID":"CVE-2023-39318","ASSIGNER":"security@golang.org","STATE":"PUBLIC"},"description":{"description_data":[{"lang":"eng","value":"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."}]},"problemtype":{"problemtype_data":[{"description":[{"lang":"eng","value":"CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')"}]}]},"affects":{"vendor":{"vendor_data":[{"vendor_name":"Go standard library","product":{"product_data":[{"product_name":"html/template","version":{"version_data":[{"version_affected":"<","version_name":"0","version_value":"1.20.8"},{"version_affected":"<","version_name":"1.21.0-0","version_value":"1.21.1"}]}}]}}]}},"references":{"reference_data":[{"url":"https://go.dev/issue/62196","refsource":"MISC","name":"https://go.dev/issue/62196"},{"url":"https://go.dev/cl/526156","refsource":"MISC","name":"https://go.dev/cl/526156"},{"url":"https://groups.google.com/g/golang-dev/c/2C5vbR-UNkI/m/L1hdrPhfBAAJ","refsource":"MISC","name":"https://groups.google.com/g/golang-dev/c/2C5vbR-UNkI/m/L1hdrPhfBAAJ"},{"url":"https://pkg.go.dev/vuln/GO-2023-2041","refsource":"MISC","name":"https://pkg.go.dev/vuln/GO-2023-2041"},{"url":"https://security.netapp.com/advisory/ntap-20231020-0009/","refsource":"MISC","name":"https://security.netapp.com/advisory/ntap-20231020-0009/"}]},"credits":[{"lang":"en","value":"Takeshi Kaneko (GMO Cybersecurity by Ierae, Inc.)"}]},"nvd":{"publishedDate":"2023-09-08 17:15:00","lastModifiedDate":"2023-11-07 04:17:00","problem_types":["CWE-79"],"metrics":{"baseMetricV3":{"cvssV3":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","attackVector":"NETWORK","attackComplexity":"LOW","privilegesRequired":"NONE","userInteraction":"REQUIRED","scope":"CHANGED","confidentialityImpact":"LOW","integrityImpact":"LOW","availabilityImpact":"NONE","baseScore":6.1,"baseSeverity":"MEDIUM"},"exploitabilityScore":2.8,"impactScore":2.7}},"configurations":{"CVE_data_version":"4.0","nodes":[{"operator":"OR","children":[],"cpe_match":[{"vulnerable":true,"cpe23Uri":"cpe:2.3:a:golang:go:*:*:*:*:*:*:*:*","versionStartIncluding":"1.21.0","versionEndExcluding":"1.21.1","cpe_name":[]},{"vulnerable":true,"cpe23Uri":"cpe:2.3:a:golang:go:*:*:*:*:*:*:*:*","versionEndExcluding":"1.20.8","cpe_name":[]}]}]}},"legacy_mitre":{"record":null,"notes":[]}}}