Covert Template System Backdoor
A vulnerability exists in the chat template mechanism used by Large Language Model (LLM) tokenizers, specifically within the Jinja2 templating engine commonly employed by libraries such as Hugging Face Transformers. By modifying the chat_template field within the tokenizer configuration (e.g., tokenizer_config.json), an attacker can inject hidden backdoor instructions into the system prompt. These instructions are concatenated with legitimate user inputs during the tokenization process…
Evaluated models: Llama 3.1 8B Instruct, DeepSeek LLM 7B Chat, Llama 3.1 70B Instruct+6 more
- Llama 3.1 8B Instruct
- DeepSeek LLM 7B Chat
- Llama 3.1 70B Instruct
- Yi 1.5 Chat 34B
- Mistral Small Instruct 2409
- Phi-3.5 Mini Instruct
- DeepSeek V3.2 Exp
- Gemini 2.5 Flash
- GPT-4o Mini