Vulnerability identifier: #VU74574
Vulnerability risk: High
CVSSv4.0: 8 [CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N/E:U/U:Amber]
CVE-ID: CVE-2023-24538
CWE-ID:
CWE-94
Exploitation vector: Network
Exploit availability: No
Vulnerable software:
Go programming language
Universal components / Libraries /
Scripting languages
Vendor: Google
Description
The vulnerability allows a remote attacker to execute arbitrary code on the target system.
The vulnerability exists due to improper input validation in html/template when handling JavaScript templates that contain backticks in code. 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.
Mitigation
Install updates from vendor's website.
Vulnerable software versions
Go programming language: 1.19 - 1.19.7, 1.20 - 1.20.2
External links
https://go.dev/cl/482079
https://pkg.go.dev/vuln/GO-2023-1703
https://groups.google.com/g/golang-announce/c/Xdv6JL9ENs8
https://go.dev/issue/59234
Can this vulnerability be exploited remotely?
Yes. This vulnerability can be exploited by a remote non-authenticated attacker via the Internet.
Is there known malware, which exploits this vulnerability?
No. We are not aware of malware exploiting this vulnerability.