Google · Go · CVE-2023-39318
**Name of the Vulnerable Software and Affected Versions**
Go versions prior to 1.20.8
dev-go/go-tools versions prior to 0.3.0
**Description**
The issue is related to the html/template package in the Go programming language, which does not properly handle HTML-like comment tokens or hashbang "#!" comment tokens in <script> contexts. This may cause the template parser to improperly interpret the contents of <script> contexts, leading to actions being improperly escaped. As a result, it may be leveraged to perform a cross-site scripting (XSS) attack.
**Recommendations**
For Go versions prior to 1.20.8, upgrade to version 1.20.8 or later to resolve the issue.
For dev-go/go-tools versions prior to 0.3.0, upgrade to version 0.3.0 or later to resolve the issue.
As a temporary workaround, consider restricting the use of the html/template package in <script> contexts until a patch is available.