Skip to content
Connect AISign inSign up free
CVE-2023-245389.8CriticalCWE-94

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.

2.3%probability of exploitation in the next 30 days
83rd percentile
050100

Higher than 83% of scored CVEs

9.8CriticalCVSS 3.1
LowCrit.

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.

Open the Atlas
Exploitation
Possible (1 to 10%). EPSS between 1% and 10%.
CISA KEV
Not listed
Public check
No public nuclei template
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