MITRE ATLAS 2026.10 · AML.T0018.003 · Critical severity

Manipulate AI Model: Modify Prompt Construction Logic

Adversaries alter the templates, chat-formatting logic, or context-assembly wrappers—such as Jinja chat templates inside GGUF files or orchestrator prompt builders—that wrap every user prompt before inference. Compromising prompt construction logic injects persistent hidden instructions or disables role boundaries across every conversation automatically.

Technique dossier overview

Category
Prompt and context integrity
Severity
Critical
Attack surface
LLM / Prompt Layer · Model Weights & Supply Chain · Tool-Using Agents & MCP
Framework maturity
Demonstrated
Platforms
Generative AI, Agentic AI
Tactics
AI Attack Adaptation, Persistence
Catalog entry modified

Open AML.T0018.003 in Interactive Technique Workbench

How the mechanism works

  1. Attackers modify `tokenizer_config.json`, GGUF `chat_template` metadata, or application-side prompt assembly pipelines.
  2. Hidden system directives or role-delimiter spoofing rules are baked into the template so every rendered user turn silently inherits attacker goals.
  3. In insecure Jinja engines, tampered chat templates can also trigger arbitrary template-expression execution when inference servers format messages.

Detection & telemetry signals

Architectural defensive countermeasures

Framework crosswalk (OWASP LLM Top 10 & NIST AI RMF)

OWASP LLM Top 10 (2025)
OWASP rationale
Tampered chat templates inject persistent prompt overrides (LLM01) via third-party model metadata (LLM03) and undermine system-prompt boundary integrity (LLM07).
NIST AI RMF functions
NIST AI RMF guidance
Under NIST AI RMF GOVERN 6.1, MEASURE, and MANAGE, treat tokenizer and chat-template configs as executable security boundaries requiring pinning and validation.

Mapped defensive controls

Related technique records

Documented incidents & exercises (5)

Source citation records

Common questions

What is Manipulate AI Model: Modify Prompt Construction Logic (AML.T0018.003)?
Adversaries alter the templates, chat-formatting logic, or context-assembly wrappers—such as Jinja chat templates inside GGUF files or orchestrator prompt builders—that wrap every user prompt before inference. Compromising prompt construction logic injects persistent hidden instructions or disables role boundaries across every conversation automatically.
How do you mitigate Manipulate AI Model: Modify Prompt Construction Logic?
MITRE ATLAS maps 4 mitigations to AML.T0018.003: Validate AI Model, Code Signing, Verify AI Artifacts, and Generative AI Guardrails. Store and verify prompt construction templates separately from untrusted model weights using signed version-controlled configs.