Go Templates unescaped backticks pre-1.21JS injection
CVE-2023-29453 Published on October 12, 2023
Agent 2 package are built with Go version affected by 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.
Vulnerability Analysis
CVE-2023-29453 can be exploited with network access, and does not require authorization privileges or user interaction. This vulnerability is considered to have a low attack complexity. The potential impact of an exploit of this vulnerability is considered to be critical as this vulnerability has a high impact to the confidentiality, integrity and availability of this component.
Weakness Type
What is a Code Injection Vulnerability?
The software constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment.
CVE-2023-29453 has been classified to as a Code Injection vulnerability or weakness.
Products Associated with CVE-2023-29453
stack.watch emails you whenever new vulnerabilities are published in Zabbix Agent2 or GoLang Go. Just hit a watch button to start following.
Affected Versions
Zabbix:- Version 5.0.0, <= 5.0.34 is affected.
- Version 6.0.0, <= 6.0.17 is affected.
- Version 6.4.0, <= 6.4.2 is affected.
- Version 5.0.0, <= 5.0.34 is affected.
- Version 6.0.0, <= 6.0.17 is affected.
- Version 6.4.0, <= 6.4.2 is affected.
Exploit Probability
EPSS (Exploit Prediction Scoring System) scores estimate the probability that a vulnerability will be exploited in the wild within the next 30 days. The percentile shows you how this score compares to all other vulnerabilities.