Live threats

All CVEs / Golang

CVE-2023-39319Golang Go

Medium 6.1 No auth needed

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 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.

Original NVD text.

What to do

  1. Apply the vendor's security update for Go.
  2. It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.

Affected packages

EcosystemPackageAffected versionsFixed inHow 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-2043). Check the version in your lockfile before upgrading.

Affected products (CPE)

VendorProductVersions
golanggo< 1.20.8
golanggo≥ 1.21.0 < 1.21.1

Official advisories

Vendor, CERT and distribution advisories that name this CVE. Original titles.

Official sources

References

Links published by the sources. Open them with care.