Your submission was sent successfully! Close

You have successfully unsubscribed! Close

CVE-2023-24538

Published: 6 April 2023

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.

Priority

Medium

Cvss 3 Severity Score

9.8

Score breakdown

Status

Package Release Status
golang-1.10
Launchpad, Ubuntu, Debian
lunar Does not exist

trusty Needed

xenial Needed

bionic Needed

focal Does not exist

jammy Does not exist

kinetic Does not exist

upstream Needs triage

golang-1.13
Launchpad, Ubuntu, Debian
lunar Does not exist

trusty Ignored
(end of standard support)
xenial Needed

bionic Needed

focal Needed

jammy Needed

kinetic Ignored
(end of life, was needed)
upstream Needs triage

golang-1.14
Launchpad, Ubuntu, Debian
lunar Does not exist

trusty Ignored
(end of standard support)
xenial Ignored
(end of standard support)
bionic Does not exist

focal Needed

jammy Does not exist

kinetic Does not exist

upstream Needs triage

golang-1.16
Launchpad, Ubuntu, Debian
lunar Does not exist

trusty Ignored
(end of standard support)
xenial Ignored
(end of standard support)
bionic Needed

focal Needed

jammy Does not exist

kinetic Does not exist

upstream Needs triage

golang-1.17
Launchpad, Ubuntu, Debian
lunar Does not exist

trusty Ignored
(end of standard support)
xenial Ignored
(end of standard support)
bionic Does not exist

focal Does not exist

jammy Needed

kinetic Does not exist

upstream Needs triage

golang-1.18
Launchpad, Ubuntu, Debian
kinetic Does not exist

lunar Does not exist

trusty Ignored
(end of standard support)
upstream Needs triage

xenial
Released (1.18.1-1ubuntu1~16.04.4)
Available with Ubuntu Pro
bionic
Released (1.18.1-1ubuntu1~18.04.4)
focal
Released (1.18.1-1ubuntu1~20.04.2)
jammy
Released (1.18.1-1ubuntu1.1)
golang-1.19
Launchpad, Ubuntu, Debian
bionic Does not exist

focal Does not exist

jammy Does not exist

kinetic
Released (1.19.2-1ubuntu1.1)
lunar Not vulnerable
(1.19.8-1)
trusty Ignored
(end of standard support)
upstream
Released (1.19.8-1)
xenial Ignored
(end of standard support)
Patches:
upstream: https://github.com/golang/go/commit/b1e3ecfa06b67014429a197ec5e134ce4303ad9b

golang-1.20
Launchpad, Ubuntu, Debian
bionic Does not exist

focal Not vulnerable
(1.20.3-1ubuntu0.1~20.04)
jammy Not vulnerable
(1.20.3-1ubuntu0.1~22.04)
kinetic Does not exist

lunar Not vulnerable
(1.20.3-1)
trusty Ignored
(end of standard support)
upstream
Released (1.20.3-1)
xenial Ignored
(end of standard support)
Patches:

upstream: https://github.com/golang/go/commit/20374d1d759bc4e17486bde1cb9dca5be37d9e52
golang-1.6
Launchpad, Ubuntu, Debian
bionic Does not exist

focal Does not exist

jammy Does not exist

kinetic Does not exist

lunar Does not exist

trusty Ignored
(end of standard support)
upstream Needs triage

xenial Needed

golang-1.8
Launchpad, Ubuntu, Debian
bionic Needed

focal Does not exist

jammy Does not exist

kinetic Does not exist

lunar Does not exist

trusty Ignored
(end of standard support)
upstream Needs triage

xenial Ignored
(end of standard support)
golang-1.9
Launchpad, Ubuntu, Debian
bionic Needed

focal Does not exist

jammy Does not exist

kinetic Does not exist

lunar Does not exist

trusty Ignored
(end of standard support)
upstream Needs triage

xenial Ignored
(end of standard support)

Severity score breakdown

Parameter Value
Base score 9.8
Attack vector Network
Attack complexity Low
Privileges required None
User interaction None
Scope Unchanged
Confidentiality High
Integrity impact High
Availability impact High
Vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H