Templates do not properly consider backticks (`) as Javascript string delimiters, and do not escape them as expected. Backticks are used, s…
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.
The product 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.
https://cwe.mitre.org/data/definitions/94.html →Open in CWE collection →An attack of this type exploits a system's trust in configuration and resource files. When the executable loads the resource (such as an image file or configuration file) the attacker has modified the file to either execute malicious code directly or manipulate the target process (e.g. application server) to execute based on the malicious configuration parameters. Since systems are increasingly interrelated mashing up resources from local and remote sources the possibility of this attack occurring is high.
https://capec.mitre.org/data/definitions/35.html →Open in CAPEC collection →This attack targets user controlled variables (DEBUG=1, PHP Globals, and So Forth). An adversary can override variables leveraging user-supplied, untrusted query variables directly used on the application server without any data sanitization. In extreme cases, the adversary can change variables controlling the business logic of the application. For instance, in languages like PHP, a number of poorly set default configurations may allow the user to override variables.
https://capec.mitre.org/data/definitions/77.html →Open in CAPEC collection →An adversary exploits a weakness in input validation on the target to inject new code into that which is currently executing. This differs from code inclusion in that code inclusion involves the addition or replacement of a reference to a code file, which is subsequently loaded by the target and used as part of the code of some application.
https://capec.mitre.org/data/definitions/242.html →Open in CAPEC collection →| Product | Vendor | Status |
|---|---|---|
| NetworkManager | Tracked | |
| buildah | Tracked | |
| buildah | Tracked | |
| collectd-libpod-stats | Tracked | |
| conmon | Tracked | |
| conmon | Tracked | |
| container-tools | Tracked | |
| containernetworking-plugins | Tracked | |
| cri-o | Tracked | |
| cri-o | Tracked | |
| cri-tools | Tracked | |
| etcd | Tracked | |
| go-toolset-1.19-golang | Tracked | |
| golang | Tracked | |
| golang-1.10 | Tracked | |
| golang-1.10 | Tracked | |
| golang-1.10 | Tracked | |
| golang-1.11 | Tracked | |
| golang-1.11 | Tracked | |
| golang-1.13 | Tracked |