V
Scaner-VS
HomeCatalogSourcesCWECAPECATT&CKMitigationsProductsVendorsDocs
CVE-2023-24538
DEB
Critical

Templates do not properly consider backticks (`) as Javascript string delimiters, and do not escape them as expected. Backticks are used, s…

CVSS
9.8
Critical
EPSS
0.02
p80
Published
2023-01-01
Updated
2023-01-01
Description

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.

Tags · CWE
Pre-auth
CWE-94
CAPEC-35
CAPEC-77
CAPEC-242
Affected products
NetworkmanagerBuildahBuildahCollectd-libpod-statsConmonConmonContainer-toolsContainernetworking-pluginsCri-oCri-oCri-toolsEtcdGo-toolset-1.19-golangGolangGolang-1.10Golang-1.10Golang-1.10Golang-1.11Golang-1.11Golang-1.13
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Timeline
2023-01-01
Published
2023-01-01
Updated
CVSS 3.1 breakdown
Attack Vector
AV: N
Network (N)
Attack Complexity
AC: L
Low (L)
Privileges Required
PR: N
None (N)
User Interaction
UI: N
None (N)
Scope
S: U
Unchanged (U)
Confidentiality Impact
C: H
High (H)
Integrity Impact
I: H
High (H)
Availability Impact
A: H
High (H)
Exploit indicators
EPSS
0.023 · p80
Known exploited (KEV)
No
MITRE ATT&CK
Inferred via CAPEC
└ via CAPEC-35 · CWE-94
└ via CAPEC-35 · CWE-94
└ via CAPEC-35 · CWE-94
Known exploits — Сканер-ВС
No Сканер-ВС checks registered for this vulnerability yet.
Affected products
ProductVendorStatus
NetworkManagerTracked
buildahTracked
buildahTracked
collectd-libpod-statsTracked
conmonTracked
conmonTracked
container-toolsTracked
containernetworking-pluginsTracked
cri-oTracked
cri-oTracked
cri-toolsTracked
etcdTracked
go-toolset-1.19-golangTracked
golangTracked
golang-1.10Tracked
golang-1.10Tracked
golang-1.10Tracked
golang-1.11Tracked
golang-1.11Tracked
golang-1.13Tracked
Showing first 20 of 83
Source databases
DEB
CVE
RED
UBU
Related vulnerabilities