Vulnerability
CVE-2023-24538
Templates do not properly consider backticks (`) as Javascript string delimiters, and do not escape them as expected. Backticks are used, since ES6, for JS template literals. If a template contains a Go template action within a Javascript template literal, the contents of the action can be used to terminate the literal, injecting arbitrary Javascript code into the Go template. As ES6 template literals are rather complex, and themselves can do string interpolation, the decision was made to simply disallow Go template actions from being used inside of them (e.g. "var a = {{.}}"), since there is no obviously safe way to allow this behavior. This takes the same approach as github.com/google/safehtml. With fix, Template.Parse returns an Error when it encounters templates like this, with an ErrorCode of value 12. This ErrorCode is currently unexported, but will be exported in the release of Go 1.21. Users who rely on the previous behavior can re-enable it using the GODEBUG flag jstmpllitinterp=1, with the caveat that backticks will now be escaped. This should be used with caution.
92 advisories report this vulnerability, across 15 ecosystems.
Advisories
-
ALAS2-2023-2163
Amazon Linux 2 2017.12 - ALAS2-2023-2163: important priority package update for golang
-
ALAS2-2023-2303
Amazon Linux 2 2017.12 - ALAS2-2023-2303: important priority package update for amazon-ssm-agent
-
ALAS2023-2023-175
Amazon Linux 2023 - ALAS2023-2023-175: Important priority package update for golang
-
ALAS2023-2023-388
Amazon Linux 2023 - ALAS2023-2023-388: Important priority package update for amazon-ssm-agent
-
ALPINE-CVE-2023-24538
Templates do not properly consider backticks (`) as Javascript string delimiters, and do not escape them as expected. Backticks are used, since ES6, for JS template literals. If a template contains a Go template action…
- ALPINE-EDGE-CVE-2023-24538
-
ALSA-2023:6346
Moderate: toolbox security and bug fix update
-
ALSA-2023:6363
Moderate: skopeo security update
-
ALSA-2023:6402
Moderate: containernetworking-plugins security and bug fix update
-
ALSA-2023:6473
Moderate: buildah security update
-
ALSA-2023:6474
Moderate: podman security, bug fix, and enhancement update
-
ALSA-2023:6938
Moderate: container-tools:4.0 security and bug fix update
-
ALSA-2023:6939
Moderate: container-tools:rhel8 security and bug fix update
-
AZL-25992
CVE-2023-24538 affecting package golang for versions less than 1.19.8-1
-
AZL-25993
CVE-2023-24538 affecting package msft-golang for versions less than 1.20.11-1
-
AZL-34751
CVE-2023-24538 affecting package golang for versions less than 1.19.8-1
-
AZL-37296
CVE-2023-24538 affecting package golang for versions less than 1.21.6-1
-
AZL-37411
CVE-2023-24538 affecting package golang for versions less than 1.21.6-1
-
AZL-78990
CVE-2023-24538 affecting package golang 1.25.7-1
-
AZL-98649
CVE-2023-24538 affecting package golang 1.27.1-1
- CGA-46px-45cg-f63w
- CGA-4fjh-rgx9-ffjr
- CGA-5mvg-j92g-23qr
- CGA-5wf4-v7cm-rf7w
- CGA-66jr-j47f-fr7r
- CGA-66v8-5vjm-97p7
- CGA-67vp-65qg-pfx5
- CGA-6fpj-hm9x-3g42
- CGA-7xv7-rf65-6jx5
- CGA-86hc-j92v-j839
- CGA-8vx5-7mfv-p4vr
- CGA-98fq-vh9x-q2m8
- CGA-99wg-j6xv-5whm
- CGA-9gw4-g4ff-87cf
- CGA-9rxj-9q26-7wj7
- CGA-f3vr-hv7c-23j8
- CGA-g33p-ghw3-rx2j
- CGA-hwgv-v2g9-5x3q
- CGA-j4xh-89c4-8rg4
- CGA-mjf4-gr37-9qjx
- CGA-pxgr-3x6w-wj9p
- CGA-r5p8-w26x-f6cv
-
DEBIAN-CVE-2023-24538
Templates do not properly consider backticks (`) as Javascript string delimiters, and do not escape them as expected. Backticks are used, since ES6, for JS template literals. If a template contains a Go template action…
-
ELSA-2023-6363
ELSA-2023-6363: skopeo security update (MODERATE)
-
ELSA-2023-6402
ELSA-2023-6402: containernetworking-plugins security and bug fix update (MODERATE)
-
ELSA-2023-6473
ELSA-2023-6473: buildah security update (MODERATE)
-
ELSA-2023-6474
ELSA-2023-6474: podman security, bug fix, and enhancement update (MODERATE)
-
ELSA-2023-6938
ELSA-2023-6938: container-tools:4.0 security and bug fix update (MODERATE)
-
ELSA-2023-6939
ELSA-2023-6939: container-tools:ol8 security and bug fix update (MODERATE)
-
GO-2023-1703
Backticks not treated as string delimiters in html/template
-
OESA-2023-1237
golang security update
-
OESA-2024-1001
ignition security update
-
OESA-2024-1074
containernetworking-plugins security update
-
OESA-2024-2551
etcd security update
-
OESA-2024-2552
etcd security update
-
OESA-2024-2582
podman security update
-
OESA-2025-1059
buildah security update
-
RHSA-2023:3318
Red Hat Security Advisory: go-toolset and golang security update
-
RHSA-2023:3319
Red Hat Security Advisory: go-toolset:rhel8 security update
-
RHSA-2023:3323
Red Hat Security Advisory: go-toolset-1.19 and go-toolset-1.19-golang security update
-
RHSA-2023:3366
Red Hat Security Advisory: OpenShift Container Platform 4.13.2 packages and security update
-
RHSA-2023:3445
Red Hat Security Advisory: Red Hat OpenStack Platform 16.2 (etcd) security update
-
RHSA-2023:3450
Red Hat Security Advisory: OpenShift Serverless Client kn 1.29.0 release
-
RHSA-2023:3536
Red Hat Security Advisory: OpenShift Container Platform 4.13.3 packages and security update
-
RHSA-2023:3540
Red Hat Security Advisory: OpenShift Container Platform 4.13.3 bug fix and security update
-
RHSA-2023:3612
Red Hat Security Advisory: OpenShift Container Platform 4.13.4 packages and security update
-
RHSA-2023:4003
Red Hat Security Advisory: Red Hat Service Interconnect 1.4 Release security update
-
RHSA-2023:4093
Red Hat Security Advisory: OpenShift Container Platform 4.13.5 security update
-
RHSA-2023:4470
Red Hat Security Advisory: Red Hat Ansible Automation Platform 2.3 Product Security and Bug Fix Update
-
RHSA-2023:5964
Red Hat Security Advisory: Red Hat OpenStack Platform 16.2.5 (collectd-libpod-stats) security update
-
RHSA-2023:6346
Red Hat Security Advisory: toolbox security and bug fix update
-
RHSA-2023:6363
Red Hat Security Advisory: skopeo security update
-
RHSA-2023:6402
Red Hat Security Advisory: containernetworking-plugins security and bug fix update
-
RHSA-2023:6473
Red Hat Security Advisory: buildah security update
-
RHSA-2023:6474
Red Hat Security Advisory: podman security, bug fix, and enhancement update
-
RHSA-2023:6938
Red Hat Security Advisory: container-tools:4.0 security and bug fix update
-
RHSA-2023:6939
Red Hat Security Advisory: container-tools:rhel8 security and bug fix update
-
RHVEX-CVE-2023-24538
golang: html/template: backticks not treated as string delimiters
-
RLSA-2023:6938
Moderate: container-tools:4.0 security and bug fix update
-
RLSA-2023:6939
Moderate: container-tools:rhel8 security and bug fix update
-
SUSE-SU-2023:1791-1
Security update for go1.20
-
SUSE-SU-2023:1792-1
Security update for go1.19
-
SUSE-SU-2023:2105-1
Security update for go1.20
-
SUSE-SU-2023:2105-2
Security update for go1.20
-
SUSE-SU-2023:2127-1
Security update for go1.19
-
SUSEVEX-CVE-2023-24538
Templates do not properly consider backticks (`) as Javascript string delimiters, and do not escape them as expected. Backticks are used, since ES6, for JS template literals. If a template contains a Go template action…
-
UBUNTU-CVE-2023-24538
Templates do not properly consider backticks (`) as Javascript string delimiters, and do not escape them as expected. Backticks are used, since ES6, for JS template literals. If a template contains a Go template action…
-
USN-6038-1
golang-1.18 vulnerabilities
-
USN-6038-2
golang-1.13, golang-1.16 vulnerabilities
-
USN-7061-1
golang-1.17 vulnerabilities
-
openSUSE-SU-2024:12841-1
go1.20-1.20.3-1.1 on GA media
-
openSUSE-SU-2024:12845-1
go1.19-1.19.8-1.1 on GA media