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.
Code Injection
ProviderTypeBase ScoreAtk. VectorAtk. ComplexityPriv. RequiredVector
NISTPrimary
9.8 CRITICAL
NETWORK
LOW
NONE
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Base Score
CVSS 3.x
EPSS Score
Percentile: 73%
Affected Products (NVD)
VendorProductVersion
golanggo
𝑥
< 1.19.8
golanggo
1.20.0 ≤
𝑥
< 1.20.3
𝑥
= Vulnerable software versions
Debian logo
Debian Releases
Debian Product
Codename
golang-1.15
bullseye
vulnerable
buster
postponed
golang-1.19
bookworm
1.19.8-2
fixed
bullseye
no-dsa
buster
postponed
Ubuntu logo
Ubuntu Releases
Ubuntu Product
Codename
golang-1.10
bionic
needed
focal
dne
jammy
dne
kinetic
dne
lunar
dne
mantic
dne
noble
dne
oracular
dne
trusty
ignored
xenial
needed
golang-1.13
bionic
Fixed 1.13.8-1ubuntu1~18.04.4+esm1
released
focal
Fixed 1.13.8-1ubuntu1.2
released
jammy
Fixed 1.13.8-1ubuntu2.22.04.2
released
kinetic
ignored
lunar
dne
mantic
dne
noble
dne
oracular
dne
trusty
ignored
xenial
Fixed 1.13.8-1ubuntu1~16.04.3+esm3
released
golang-1.14
bionic
dne
focal
needed
jammy
dne
kinetic
dne
lunar
dne
mantic
dne
noble
dne
oracular
dne
trusty
ignored
xenial
ignored
golang-1.16
bionic
Fixed 1.16.2-0ubuntu1~18.04.2+esm1
released
focal
Fixed 1.16.2-0ubuntu1~20.04.1
released
jammy
dne
kinetic
dne
lunar
dne
mantic
dne
noble
dne
oracular
dne
trusty
ignored
xenial
ignored
golang-1.17
bionic
dne
focal
dne
jammy
Fixed 1.17.13-3ubuntu1.2
released
kinetic
dne
lunar
dne
mantic
dne
noble
dne
oracular
dne
trusty
ignored
xenial
ignored
golang-1.18
bionic
Fixed 1.18.1-1ubuntu1~18.04.4
released
focal
Fixed 1.18.1-1ubuntu1~20.04.2
released
jammy
Fixed 1.18.1-1ubuntu1.1
released
kinetic
dne
lunar
dne
mantic
dne
noble
dne
oracular
dne
trusty
ignored
xenial
Fixed 1.18.1-1ubuntu1~16.04.4
released
golang-1.19
bionic
dne
focal
dne
jammy
dne
kinetic
Fixed 1.19.2-1ubuntu1.1
released
lunar
not-affected
mantic
dne
noble
dne
oracular
dne
trusty
ignored
xenial
ignored
golang-1.20
bionic
dne
focal
not-affected
jammy
not-affected
kinetic
dne
lunar
not-affected
mantic
not-affected
noble
dne
oracular
dne
trusty
ignored
xenial
ignored
golang-1.6
bionic
dne
focal
dne
jammy
dne
kinetic
dne
lunar
dne
mantic
dne
noble
dne
oracular
dne
trusty
ignored
xenial
needed
golang-1.8
bionic
needed
focal
dne
jammy
dne
kinetic
dne
lunar
dne
mantic
dne
noble
dne
oracular
dne
trusty
ignored
xenial
ignored
golang-1.9
bionic
needed
focal
dne
jammy
dne
kinetic
dne
lunar
dne
mantic
dne
noble
dne
oracular
dne
trusty
ignored
xenial
ignored
Red Hat logo
Red Hat Enterprise Linux Releases
Red Hat Product
Release
buildah
RHEL 9
1:1.31.3-1.el9
fixed
buildah-tests
RHEL 9
1:1.31.3-1.el9
fixed
containernetworking-plugins
RHEL 9
1:1.3.0-4.el9
fixed
golang
RHEL 9
0:1.19.9-2.el9_2
fixed
golang-bin
RHEL 9
0:1.19.9-2.el9_2
fixed
golang-docs
RHEL 9
0:1.19.9-2.el9_2
fixed
golang-misc
RHEL 9
0:1.19.9-2.el9_2
fixed
golang-race
RHEL 9
0:1.19.9-2.el9_2
fixed
golang-src
RHEL 9
0:1.19.9-2.el9_2
fixed
golang-tests
RHEL 9
0:1.19.9-2.el9_2
fixed
podman
RHEL 9
2:4.6.1-5.el9
fixed
podman-docker
RHEL 9
2:4.6.1-5.el9
fixed
podman-gvproxy
RHEL 9
2:4.6.1-5.el9
fixed
podman-plugins
RHEL 9
2:4.6.1-5.el9
fixed
podman-remote
RHEL 9
2:4.6.1-5.el9
fixed
podman-tests
RHEL 9
2:4.6.1-5.el9
fixed
skopeo
RHEL 9
2:1.13.3-1.el9
fixed
skopeo-tests
RHEL 9
2:1.13.3-1.el9
fixed
toolbox
RHEL 9
0:0.0.99.4-6.el9_3
fixed
toolbox-tests
RHEL 9
0:0.0.99.4-6.el9_3
fixed