CVE-2023-39319
MEDIUM 6.1CVSS 3.1Improper handling of special tags within script contexts in html/template
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.
- Published
- 8 Sep 2023
- Last modified
- 17 Jun 2026
- Assigned by
- security@golang.org
- NVD status
- Modified
- Weakness
- CWE-79
- Also known as
- BIT-golang-2023-39319GO-2023-2043
- Sources
- NVDJSONOSV GO-2023-2043JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | MEDIUM 6.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | golang | gocpe:2.3:a:golang:go:*:*:*:*:*:*:*:* |
< 1.20.8 | 1.20.8 |
| NVD | golang | gocpe:2.3:a:golang:go:*:*:*:*:*:*:*:* |
>= 1.21.0, < 1.21.1 | 1.21.1 |
| OSV | Go | stdlib | < 1.20.8; >= 1.21.0-0, < 1.21.1 | 1.20.8, 1.21.1 |
References
- https://go.dev/cl/526157 · Patch, FIX
- https://go.dev/issue/62197 · Issue Tracking, REPORT
- https://groups.google.com/g/golang-dev/c/2C5vbR-UNkI/m/L1hdrPhfBAAJ · Release Notes, WEB
- https://pkg.go.dev/vuln/GO-2023-2043 · Vendor Advisory
- https://security.gentoo.org/glsa/202311-09
- https://security.netapp.com/advisory/ntap-20231020-0009/ · Third Party Advisory
History
- 25 Nov 2026 20:36 UTC · NVD: first stored (published 8 Sep 2023)
- 25 Nov 2026 20:14 UTC · OSV: first stored (published 7 Sep 2023)