# CVE-2023-39319: Improper handling of special tags within script contexts in html/template

- Severity: Medium 6.1 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.91%, higher than 61% of CVEs (2026-12-01)
- Published: 2023-09-07T16:11:59.000Z
- Modified: 2026-09-08T08:47:48.871Z
- Also known as: GO-2023-2043, BIT-GOLANG-2023-39319
- Related: CGA-4gc6-fx2r-v7r7
- Weaknesses: CWE-79
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: Go

## Description

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.

(As written by CVE List.)

## Affected

- html/template: before 1.20.8; from 1.21.0-0 before 1.21.1
- stdlib (Go): before 1.20.8; from 1.21.0-0 before 1.21.1
- golang go: before 1.20.8; from 1.21.0 before 1.21.1
- golang (Bitnami): before 1.20.8; from 1.21.0 before 1.21.1

## Every score

- NVD: CVSS:3.1 6.1 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`
- Bitnami Vulnerability Database: rating Medium

## References

- <https://go.dev/issue/62197> (issue-tracking, report)
- <https://go.dev/cl/526157> (fix, patch)
- <https://groups.google.com/g/golang-dev/c/2C5vbR-UNkI/m/L1hdrPhfBAAJ> (article, release-notes, web)
- <https://pkg.go.dev/vuln/GO-2023-2043> (advisory, vendor-advisory)
- <https://security.netapp.com/advisory/ntap-20231020-0009/> (advisory, third-party-advisory)
- <https://security.gentoo.org/glsa/202311-09> (web)
- <https://nvd.nist.gov/vuln/detail/CVE-2023-39319> (web)

## Sources

- CVE List: [CVE-2023-39319](https://www.cve.org/CVERecord?id=CVE-2023-39319), CVE Terms of Use, modified 2025-02-13
- Go Vulnerability Database: [GO-2023-2043](https://pkg.go.dev/vuln/GO-2023-2043), CC-BY-4.0, modified 2026-02-04
- NVD: [CVE-2023-39319](https://nvd.nist.gov/vuln/detail/CVE-2023-39319), Public domain, modified 2026-06-17
- Bitnami Vulnerability Database: [BIT-GOLANG-2023-39319](https://osv.dev/vulnerability/BIT-GOLANG-2023-39319), Apache-2.0, modified 2026-09-08

---

Page: https://cve.day/CVE-2023-39319 · Whole record: https://cve.day/CVE-2023-39319.json · Rebuilt by cve.day 2026-11-25T22:58:27.766Z
