Medium severity · published Sep 8, 2023
CVE-2023-39319
The html/template package does not apply the proper rules for handling occurrences of "<script", "<!--", and "</script" within JS literals in <script> contexts
6.1
CVSS
0.9%
EPSS
No
On KEV
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.
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Attack vector
Network
Complexity
Low
Privileges
None
User interaction
Required
Confidentiality
Low
Integrity
Low
Availability
None
Scope
Changed
Exploitation
Is it being used?
Exploit prediction (EPSS)0.9% · higher than 60% of CVEs
Exploited in the wildNo evidence yet
CISA KEVNot listed
Ransomware campaign useNot known
Affected products
Which versions
GO
GO · Golang
before 1.20.8; 1.21.0 before 1.21.1 · source: NVD
References
NVD
https://nvd.nist.gov/vuln/detail/CVE-2023-39319
CVE.org
https://www.cve.org/CVERecord?id=CVE-2023-39319
Patch
https://go.dev/cl/526157
Issue Tracking
https://go.dev/issue/62197
Release Notes
https://groups.google.com/g/golang-dev/c/2C5vbR-UNkI/m/L1hdrPhfBAAJ
Vendor Advisory
https://pkg.go.dev/vuln/GO-2023-2043
security.gentoo.org
https://security.gentoo.org/glsa/202311-09
Third Party Advisory
https://security.netapp.com/advisory/ntap-20231020-0009/
More from GO
8.1
CVE-2020-0601
Microsoft Windows CryptoAPI Spoofing Vulnerability
7.5
CVE-2023-44487
HTTP/2 Rapid Reset Attack Vulnerability
10.0
CVE-2025-68121
Unexpected session resumption in crypto/tls
9.8
CVE-2026-27143
Missing bound checks can lead to memory corruption in safe Go in cmd/compile
9.8
CVE-2024-24790
The various Is methods (IsPrivate, IsLoopback, etc) did not work as expected for IPv4-mapped IPv6 addresses, returning false for addresses which would return true in their…
