Skip to main content
Mallory
CriticalVulnerability

CVE-2023-24538: JavaScript code injection in Go html/template backtick handling

Published Apr 6, 2023 · Updated 4 days ago
Trending this weekNot trendingOutside this week’s top 100
Mention activity · 30 days4 mentions · peak 1 in a dayToday
CVSS9.8Critical · v3.1
EPSS2.4%85th percentile
CISA KEVNoNot listed
In the wildNoneNo exploitation reported
Vendor
Golang
IdentifiersCVE-2023-24538CWE-94 · Improper Control of Generation of…

CVE-2023-24538 is a code-injection vulnerability in Go's html/template package. Its contextual escaping does not correctly recognize backticks as JavaScript string delimiters for ES6 template literals. When a Go template action appears inside a JavaScript template literal, attacker-controlled action data can terminate the literal and inject arbitrary JavaScript into the rendered output. The corrective change rejects Go template actions inside JavaScript template literals, producing an error with ErrorCode 12.

Do you run this?See affected versions in your environment and whether adversaries are exploiting this vulnerability against assets like yours.
Check your exposure
Analyst brief

Impact, mitigation & remediation

What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.

Impact

What an attacker gets, and what they’ve been doing with it.

Successful exploitation can cause attacker-supplied JavaScript to execute when the rendered output is evaluated, enabling cross-site scripting in web applications. Depending on the application's security context, this can expose data accessible to scripts and permit unauthorized actions or modification of displayed content. The template-escaping flaw alone does not establish native code execution on the Go server.

Mitigation

If you can’t patch tonight, do this now.

Remove Go template actions from JavaScript template literals or disable the affected rendering functionality until patched applications can be deployed. Do not rely on ad hoc backtick filtering because JavaScript template literals also support interpolation and complex syntax. Red Hat identifies no general mitigation meeting its product-security criteria for usability, deployability, applicability, and stability.

Remediation

Patch, then assume compromise.

Apply a Go security update or vendor backport addressing CVE-2023-24538, then rebuild and redeploy affected Go applications. For packaged products or containerized applications, install the corresponding vendor-fixed packages or images. Refactor templates that place Go actions inside JavaScript template literals because the corrective change rejects that construction. Avoid enabling the GODEBUG compatibility setting jstmpllitinterp=1: it restores interpolation with backtick escaping and is explicitly cautioned against as a compatibility measure rather than the preferred secure behavior.

Public exploits

Exploits

No public exploits tracked yet. Mallory keeps watching.

View more in app →
No public exploit code observed for this vulnerability. Mallory keeps watching.
Exposure surface

Affected products & vendors

Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.

VendorProductType
GolangGoapplication
FAQ

Frequently asked questions

Is CVE-2023-24538 exploited in the wild?
As of Nov 24, 2026, Mallory has no reports of CVE-2023-24538 being exploited in the wild. It is not listed in CISA KEV.
Is there a public exploit for CVE-2023-24538?
As of Nov 24, 2026, Mallory has found no public exploit for CVE-2023-24538.
Is there a patch for CVE-2023-24538?
Apply a Go security update or vendor backport addressing CVE-2023-24538, then rebuild and redeploy affected Go applications. For packaged products or containerized applications, install the corresponding vendor-fixed packages or images.
What products are affected by CVE-2023-24538?
Golang Go.
How severe is CVE-2023-24538?
CVE-2023-24538 has a CVSS v3.1 score of 9.8 (Critical) and an EPSS score of 2.4% (85th percentile) as of Nov 24, 2026.
Mallory platform

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which adversaries are exploiting it right now, and which detections to deploy tonight.
Exposure mappingQuery your assets running an affected version, and investigate the blast radius.
Threat actor evidenceEvery report linking this CVE to a named adversary.
Associated malwareMalware families linked to this CVE, with evidence and IOCs.
Detection signaturesYARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.
Vendor-by-vendor mappingCross-references every affected SKU, including bundled OEM variants.
Social activityCommunity discussion across Reddit, Mastodon, and other social sources.