VDB

CVE-2023-39319

CVE-2023-39319 PUBLISHED

Improper handling of special tags within script contexts in html/template

Reported by go · Published September 8, 2023

html/template is fixed in 1.21.1 and 1.20.8 (Go Modules)

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.

Fixed versions

Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.

PackageEcosystemFixed in
stdlibGo Modules1.21.1, 1.20.8
html/templateGo Modules1.21.1, 1.20.8
golangAmazon Linux1.20.10-1.amzn2.0.1, 1.20.8-1.amzn2023.0.1
golang-docsAmazon Linux1.20.10-1.amzn2.0.1, 1.20.8-1.amzn2023.0.1
golang-binAmazon Linux1.20.10-1.amzn2.0.1, 1.20.8-1.amzn2023.0.1
golang-sharedAmazon Linux1.20.10-1.amzn2.0.1, 1.20.8-1.amzn2023.0.1
golang-testsAmazon Linux1.20.10-1.amzn2.0.1, 1.20.8-1.amzn2023.0.1
kubeflow-katibChainguard0.19.0-r40, 0.19.0-r31
falcoChainguard0.37.1-r0
golang-srcAmazon Linux1.20.10-1.amzn2.0.1, 1.20.8-1.amzn2023.0.1
metrics-serverChainguard0.6.4-r1
golangBitnami1.21.1, 1.20.8

9 more packages have a fixed version. See every fix in Lookup.

Affected products

VendorProductVersions
Go standard libraryhtml/template0, 1.21.0-0
amazon:2023golang0
amazon:2golang-docs0
amazon:2golang0
amazon:2023golang-bin0
amazon:2golang-shared0
amazon:2golang-tests0
amazon:2golang-bin0
chainguardkubeflow-katib0, 0
chainguardfalco0
amazon:2023golang-shared0
amazon:2023golang-docs0
amazon:2golang-src0
chainguardmetrics-server0
Go standard libraryhtml/template1.21.0-0, 0
chainguardkind0
amazon:2023golang-tests0
alpinego0, 0
wolfikind0
amazon:2023golang-src0

…and 5 more

Timeline

  • Sep 6, 2023 CVE Published
  • Sep 9, 2023 EPSS Score (30 in total, the first dated here)
  • Feb 8, 2026 Security Advisory (34 in total, the first dated here)
  • Aug 5, 2026 Coalition ESS Score
  • Nov 22, 2026 Distribution Patch (31 in total, the first dated here)

Query this with the API

The same record, from the CLI:

vulnetix vdb vuln CVE-2023-39319
vulnetix vdb fixes CVE-2023-39319

Or with curl, using the org id and key from your account page:

curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
  "https://api.vdb.vulnetix.com/v2/vuln/CVE-2023-39319/fixes/registry"

The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart

References

Look up in the Resolve Platform →
$ Lookup Community · 50/day Open Lookup ›