CVE-2023-24539: HTML injection in Go html/template CSS sanitization
- Vendor
- Golang
CVE-2023-24539 is a contextual-escaping vulnerability in Go's html/template package. The CSS-value sanitizer does not treat angle brackets as dangerous characters. When a template contains multiple actions separated by a slash character and processes untrusted input, the resulting output can prematurely terminate the CSS context and inject unexpected HTML. Exploitability depends on the application's template structure and whether attacker-controlled values reach the affected CSS context.
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 compromises the integrity of generated HTML and may enable cross-site scripting when the injected markup is interpreted by a browser. Depending on the application and injected markup, consequences may include unauthorized browser-side actions and exposure of application data. The vulnerability does not by itself establish server-side code execution. Red Hat assigns a CVSS v3.1 score of 7.3, with low confidentiality, integrity, and availability impacts.
Mitigation
If you can’t patch tonight, do this now.
Red Hat reported no mitigation meeting its Product Security criteria. Pending patching, reduce exposure by preventing untrusted values from reaching affected CSS template contexts and restricting access to vulnerable rendering functionality. Authentication can limit the attacker population but does not correct the escaping defect.
Remediation
Patch, then assume compromise.
Apply the relevant vendor security updates to affected Go toolchains, packages, and container images. Rebuild and redeploy affected Go applications using a patched toolchain so that deployed binaries incorporate the corrected standard library. Confirmed fixed product releases include RHACS 3.74.4 and 4.0.2, OpenShift Serverless 1.29.1, and Red Hat Developer Tools go-toolset-1.19-golang package version 1.19.9-1.el7_9. For distribution packages, verify vendor errata and backported fixes rather than relying solely on upstream version comparisons.
Exploits
No public exploits tracked yet. Mallory keeps watching.
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.
References
Frequently asked questions
- Is CVE-2023-24539 exploited in the wild?
- As of Nov 19, 2026, Mallory has no reports of CVE-2023-24539 being exploited in the wild. It is not listed in CISA KEV.
- Is there a public exploit for CVE-2023-24539?
- As of Nov 19, 2026, Mallory has found no public exploit for CVE-2023-24539.
- Is there a patch for CVE-2023-24539?
- Apply the relevant vendor security updates to affected Go toolchains, packages, and container images. Rebuild and redeploy affected Go applications using a patched toolchain so that deployed binaries incorporate the corrected standard library.
- What products are affected by CVE-2023-24539?
- Golang Go.
- How severe is CVE-2023-24539?
- CVE-2023-24539 has a CVSS v3.1 score of 7.3 (High) and an EPSS score of 1.1% (65th percentile) as of Nov 19, 2026.
Recent activity
38 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.