Mend.io Vulnerability Database
The largest open source vulnerability database
What is a Vulnerability ID?
New vulnerability? Tell us about it!
MAI-2024-0029
Published:May 16, 2026
Updated:May 16, 2026
Large Language Models (LLMs) that have been fine-tuned using chat templates are susceptible to a vulnerability known as ChatBug. This vulnerability enables adversaries to circumvent safety protocols by crafting prompts that either deviate from the anticipated template format or exceed designated message field limits. The exploitation arises from the LLM's dependency on the template structure, which does not impose equivalent constraints on user inputs, thereby allowing malicious manipulation. Mitigation steps: **For AI Developers:** * Implement stricter input validation to detect and reject prompts that deviate significantly from the expected chat template format. * Employ advanced response filtering mechanisms to identify and block unsafe outputs, potentially utilizing additional LLMs for this task. **For Model Trainers/Fine-tuners:** * Fine-tune the LLM with adversarial examples that exploit ChatBug to enhance robustness against such attacks.
Related Resources (1)
Do you need more information?
Contact Us
CVSS v4
Base Score:
8.7
Attack Vector
NETWORK
Attack Complexity
LOW
Attack Requirements
NONE
Privileges Required
NONE
User Interaction
NONE
Vulnerable System Confidentiality
NONE
Vulnerable System Integrity
HIGH
Vulnerable System Availability
NONE
Subsequent System Confidentiality
NONE
Subsequent System Integrity
LOW
Subsequent System Availability
NONE
CVSS v3
Base Score:
8.6
Attack Vector
NETWORK
Attack Complexity
LOW
Privileges Required
NONE
User Interaction
NONE
Scope
CHANGED
Confidentiality
NONE
Integrity
HIGH
Availability
NONE
AIVSS
Base Score:
5.2