Skip to content
LLMHigh

Poisoned GGUF Templates: Inference-Time Supply Chain Attack

Occurred
Jun 1, 2025
Published
Unknown
Source
MITRE ATLAS
Sector
exercise

Summary

Researchers from Pillar Security and Fujitsu Research of Europe demonstrated an inference-time supply-chain backdoor in which poisoned chat templates alter model and agent behavior without modifying model weights. The backdoor is embedded in trusted prompt-construction logic, allowing it to remain dormant until triggered and evade defenses that inspect only external prompt content. The researchers demonstrated the attack using GPT-Generated Unified Format (GGUF), a widely used model format that packages quantized weights, configuration metadata, and chat-template logic in one artifact. An adversary can modify a template and redistribute the artifact; when a lexical, semantic, or contextual trigger occurs, the template injects attacker-controlled instructions into the context sent to the model. The attack was validated across eighteen models from seven families and four inference engines. In controlled evaluations, it manipulated model responses, redirected agent tool use, exfiltrated sensitive data, and inserted attacker-controlled code into generated software. Target: Model registries distributing models in GGUF format Actor: Pillar Security, Fujitsu Research of Europe Procedure: 1. The adversary obtains a legitimate open-weight model artifact containing a bundled chat template. The adversary selects an artifact whose downstream users are likely to retain and use the supplied template. 2. The adversary develops a template-based backdoor containing conditional trigger logic and an attacker-controlled instruction payload. The trigger is selected to activate during ordinary use of the intended application. 3. The adversary modifies the chat template bundled with the model artifact. The modified template injects attacker-controlled instructions into the model context when its trigger is present, while leaving the model weights unchanged. 4. The adversary makes the modified artifact appear equivalent to the legitimate model. The artifact preserves expected behavior when the trigger is absent, and the malicious logic is concealed among legitimate template formatting and control logic. 5. The adversary publishes the modified model artifact through a model repository or another distribution channel used by downstream developers and organizations. 6. A victim downloads and integrates the poisoned artifact while trusting the model and its bundled components. This introduces the template backdoor into the victim's AI application or agent. 7. The victim loads and uses the poisoned artifact in a compatible inference engine. During inference, the engine automatically interprets the bundled chat template, causing the attacker-modified prompt-construction logic to execute as part of normal model use. 8. When a designated phrase or contextual condition appears, the template injects the attacker-controlled instruction into the serialized model context. The victim's ordinary activity activates the backdoor without requiring additional attacker interaction.

Deployers

  • Model registries distributing models in GGUF format

Tags

  • MITRE ATLAS
  • AML.CS0064

Classification

Category confidence: 95%
Severity confidence: 90%

Rationale: Inference-time supply chain attack on model templates causing data exfiltration and code injection without weight modification.

Classifier: Qwen/Qwen3.5-35B-A3B-FP8

Visit source