CVE-2023-39319
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.
| Package | Ecosystem | Fixed in |
|---|---|---|
| stdlib | Go Modules | 1.21.1, 1.20.8 |
| html/template | Go Modules | 1.21.1, 1.20.8 |
| golang | Amazon Linux | 1.20.10-1.amzn2.0.1, 1.20.8-1.amzn2023.0.1 |
| golang-docs | Amazon Linux | 1.20.10-1.amzn2.0.1, 1.20.8-1.amzn2023.0.1 |
| golang-bin | Amazon Linux | 1.20.10-1.amzn2.0.1, 1.20.8-1.amzn2023.0.1 |
| golang-shared | Amazon Linux | 1.20.10-1.amzn2.0.1, 1.20.8-1.amzn2023.0.1 |
| golang-tests | Amazon Linux | 1.20.10-1.amzn2.0.1, 1.20.8-1.amzn2023.0.1 |
| kubeflow-katib | Chainguard | 0.19.0-r40, 0.19.0-r31 |
| falco | Chainguard | 0.37.1-r0 |
| golang-src | Amazon Linux | 1.20.10-1.amzn2.0.1, 1.20.8-1.amzn2023.0.1 |
| metrics-server | Chainguard | 0.6.4-r1 |
| golang | Bitnami | 1.21.1, 1.20.8 |
9 more packages have a fixed version. See every fix in Lookup.
Affected products
| Vendor | Product | Versions |
|---|---|---|
| Go standard library | html/template | 0, 1.21.0-0 |
| amazon:2023 | golang | 0 |
| amazon:2 | golang-docs | 0 |
| amazon:2 | golang | 0 |
| amazon:2023 | golang-bin | 0 |
| amazon:2 | golang-shared | 0 |
| amazon:2 | golang-tests | 0 |
| amazon:2 | golang-bin | 0 |
| chainguard | kubeflow-katib | 0, 0 |
| chainguard | falco | 0 |
| amazon:2023 | golang-shared | 0 |
| amazon:2023 | golang-docs | 0 |
| amazon:2 | golang-src | 0 |
| chainguard | metrics-server | 0 |
| Go standard library | html/template | 1.21.0-0, 0 |
| chainguard | kind | 0 |
| amazon:2023 | golang-tests | 0 |
| alpine | go | 0, 0 |
| wolfi | kind | 0 |
| amazon:2023 | golang-src | 0 |
…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