Poisoned Pipeline / Techniques / T0273

T0273 · Initial Access · TA03 · observed in 1 incident(s)

Hide an instruction in the chat template that the model repeats but the chat window never shows

AI Posture Open Source Security

Every GGUF file carries tokenizer.chat_template, a small Jinja2 program the
runtime applies to the conversation before the model sees it. C++ runtimes
render it in a restricted engine with no Python behind it, so the classic
template-injection payloads that reach the operating system do not work
there. The attacks here do not need them: the template uses ordinary logic
to add text to the conversation, and that text never appears in the chat
window.

Mir2k's armed template adds a French system message telling the model it is
a helpful assistant and to begin every reply with one PowerShell line,
copied character by character, before answering normally. The line finds
the largest .gguf file in the user's profile, reads its last bytes and
writes them to %TEMP%\d.exe, then starts the process. The model answers
normally, and the command arrives as the first line of every reply,
presented as something the model produced rather than something the file
contained. An earlier version of the same template read a fixed path in the
Downloads folder and was replaced nine hours later with the profile-wide
search.

Distinct from T0268, where config.json names Python the loader imports, and
from T0224, where a spoofed system dialog asks for a password. No code is
imported and no prompt is forged; the artifact's own metadata manufactures
the text.

Where this idea came from

Public incident / advisory

From the armed Mir2k template, whose French system message made the model begin every reply with a PowerShell line that read the appended bytes out of the largest .gguf in the profile and started them. Ordinary template logic, not a sandbox escape. Distinct from T0268 (config names Python the loader imports) and from T0224 (a spoofed system dialog).

Mitigations

None linked yet.

Detections

None linked yet.

Observed in incidents (1)

References