CVE-2023-24538

CRITICAL

Go Templates - Code Injection via JavaScript Template Literals

Title source: manual
STIX 2.1

Exploitation Summary

EIP tracks 2 public exploits for CVE-2023-24538. PoCs published by skulkarni-mv.

AI-analyzed exploit summary This repository contains test cases and self-test utilities for the Yocto Project, specifically for validating functionality in meta-selftest. It includes test cases for package management (dnf), runtime checks, and plugin functionality, but does not contain exploit code for CVE-2023-24538.

Description

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.

Exploits (2)

nomisec WRITEUP
by skulkarni-mv · poc
https://github.com/skulkarni-mv/goIssue_dunfell

This repository contains test cases and self-test utilities for the Yocto Project, specifically for validating functionality in meta-selftest. It includes test cases for package management (dnf), runtime checks, and plugin functionality, but does not contain exploit code for CVE-2023-24538.

Classification
Writeup 90%
Attack Type
Other
Complexity
Moderate
Reliability
Theoretical
Target: Yocto Project meta-selftest
No auth needed
Prerequisites: Yocto Project environment
devstral-2 · analyzed Feb 18, 2026 Full analysis →
nomisec STUB
by skulkarni-mv · poc
https://github.com/skulkarni-mv/goIssue_kirkstone

The repository contains metadata and test files for OpenEmbedded/Yocto Project but lacks any exploit code or technical details related to CVE-2023-24538. It appears to be a placeholder or unrelated repository.

Classification
Stub 90%
Attack Type
Other
Complexity
Trivial
Reliability
Theoretical
Target: OpenEmbedded/Yocto Project
No auth needed
devstral-2 · analyzed Feb 18, 2026 Full analysis →

Scores

CVSS v3 9.8
EPSS 0.0228
EPSS Percentile 80.9%
Attack Vector NETWORK
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

CISA SSVC

Vulnrichment
Exploitation none
Automatable no
Technical Impact total

Details

CWE
CWE-94
Status published
Products (1)
golang/go < 1.19.8
Published Apr 06, 2023
Tracked Since Feb 18, 2026