CVE-2023-39318Golang Go
Medium 6.1 No auth needed
Follow: this CVE · Golang · Golang Go We alert you by email or Slack (account required).
- Priority
- 52
- CVSS 3.1
- 6.1
- EPSS
- 1.0% probability of exploitation in 30 days · percentile 60
- Auth required
- No
- Published
- Sep 8, 2023
- Updated
- Jun 17, 2026
- Category
- Application · Cross-platform
- Weakness (CWE)
- CWE-79
- SSVC (CISA)
- Exploitation: none · Automatable: no · Technical impact: partial
- Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
What happens
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.
What to do
- Apply the vendor's security update for Go.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| Go | stdlib |
< 1.20.8 |
1.20.8 |
go get stdlib@v1.20.8 |
| Go | stdlib |
≥ 1.21.0-0 < 1.21.1 |
1.21.1 |
go get stdlib@v1.21.1 |
Per OSV / GitHub Advisories (GO-2023-2041). Check the version in your lockfile before upgrading.
Affected products (CPE)
| Vendor | Product | Versions |
|---|---|---|
| golang | go | < 1.20.8 |
| golang | go | ≥ 1.21.0 < 1.21.1 |
Official advisories
- Red Hat Security Advisory: OpenShift Container Platform 4.14.2 packages and security update · Red Hat · RHSA-2023:6840 · Oct 2, 2024 High
- Red Hat Security Advisory: OpenShift Container Platform 4.14.0 security update · Red Hat · RHSA-2023:5009 · Oct 2, 2024 High
Vendor, CERT and distribution advisories that name this CVE. Original titles.
Official sources
References
Links published by the sources. Open them with care.
- go.dev Patch
- go.dev Issue Tracking
- groups.google.com Mailing List Release Notes
- pkg.go.dev Vendor Advisory
- security.gentoo.org
- security.netapp.com Third Party Advisory