CVE-2023-24538: Backticks not treated as string delimiters in html/template
Go standard library · html/template
Vendor fix available · Affected: Go standard library html/template · Exploitation: possible (1 to 10%)
Not in CyberSIXT coverage yet: no article names this CVE. This page shows the public record.
Higher than 83% of scored CVEs
DescriptionCVE.org
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.
Affected products1
From the CVE record. A product or version that is not listed is unknown, not unaffected.
- Go standard library · html/templatebefore 1.19.8; from 1.20.0-0 before 1.20.3
On the Atlas
Every published CVE is on the CyberSIXT Atlas, grouped by weakness, vendor and month.
- Exploitation
- Possible (1 to 10%). EPSS between 1% and 10%.
- CISA KEV
- Not listed
- Public check
- No public nuclei template
- Vendor
- Go standard library
- Published
- April 2023
CoverageNo articles yet
No CyberSIXT article names CVE-2023-24538 yet, so there is no coverage timeline, action brief or change log for it. Everything on this page comes from the public CVE record, CISA KEV, EPSS and the nuclei template index. Search the archive or see the CVEs in the news.
References
- NVD entrynvd.nist.gov
- CVE recordcve.org
- Weakness CWE-94cwe.mitre.org
- go.dev/issue/59234go.dev
- go.dev/cl/482079go.dev
- groups.google.com/g/golang-announce/c/Xdv6JL9ENs8groups.google.com
- pkg.go.dev/vuln/GO-2023-1703pkg.go.dev
- security.gentoo.org/glsa/202311-09security.gentoo.org
- security.netapp.com/advisory/ntap-20241115-0007security.netapp.com