The LMVD-ID is an internal research identifier, not an official CVE identifier.
LLM Guardrail Benchmark Lies
Architectural limitations in Meta's Llama-Prompt-Guard-2-86M and Llama-Guard-3-8B cause them to fail at detecting indirect prompt injections and agentic tool-use attacks, with detection rates dropping as low as 7-37%…
Paper-evaluated models(2)
- Llama 3 8B
- Llama 3.1 8B
Description
Architectural limitations in Meta's Llama-Prompt-Guard-2-86M and Llama-Guard-3-8B cause them to fail at detecting indirect prompt injections and agentic tool-use attacks, with detection rates dropping as low as 7-37%. Llama-Guard-3-8B enforces strict user/assistant message alternation and lacks support for tool-use roles; attempting to process messages with role: "tool" or role: "ipython" causes the chat template to raise an error, preventing evaluation entirely. PromptGuard 2 operates strictly on raw text without chat template support, blinding it to structural message boundaries and tool provenance. Consequently, attackers can bypass these safety guardrails and hijack LLM agents by embedding malicious instructions within external documents, API responses, or tool outputs.
Examples
- LlamaGuard Tool Role Error: When an LLM agent processes a tool response containing a malicious payload (e.g., from the InjecAgent dataset), the message structure includes
role: "tool"orrole: "ipython". Passing this conversation directly to LlamaGuard for safety evaluation causes a chat template application failure because LlamaGuard's template strictly expects alternatinguserandassistantroles and silently ignores thetoolsparameter, resulting in an unhandled exception or bypassed check. - PromptGuard Context Flattening Bypass: Because PromptGuard 2 lacks chat template support, multi-turn agentic workflows must be concatenated into raw text (e.g.,
system: [...] user: [...] assistant: [...]). Attackers can exploit this flat structure by injecting role-playing headers or context-switching prompts inside retrieved text or tool responses (e.g., BIPIA dataset indirect injections). PromptGuard evaluates the flattened string without understanding the structural boundary between trusted instructions and untrusted external data, leading to a failure to detect the injection. - See the InjecAgent (arXiv:2403.02691) and BIPIA (arXiv:2501.00288) datasets for reproducible examples of tool-use and indirect prompt injection attacks that bypass these guardrails.
- See the primary evaluation, When Benchmarks Lie (opens in a new tab), for the tested classifiers and distribution-shift results.
Impact
Attackers can successfully execute indirect prompt injections and hijack agentic workflows. By placing malicious commands inside tool outputs, emails, or retrieved documents, an attacker can manipulate the LLM agent into executing unauthorized actions, exfiltrating data, or bypassing intended system restrictions without triggering the deployment's safety guardrails.
Affected Systems
- Meta Llama-Guard-3-8B (when used in agentic/tool-use workflows)
- Meta Llama-Prompt-Guard-2-86M
- Agentic LLM pipelines relying on these conversational guardrails for input/output sanitization.
Mitigation Steps
- Implement Activation-Based Probes: Extract activations from the underlying LLM's residual stream (e.g., layer 31, at the last token of the user message before the generation prompt) and use linear probes (logistic regression) to classify malicious inputs. This natively incorporates the model's chat template and tool schema understanding, achieving significantly higher detection rates (up to 99%) on indirect and tool-use injections.
- Adopt Leave-One-Dataset-Out (LODO) Evaluation: When training or evaluating prompt attack classifiers, hold out entire datasets during training rather than using standard train-test splits from the same sources. This prevents the classifier from learning dataset-specific shortcuts (e.g., specific email formatting) and accurately measures true out-of-distribution generalization.
- Filter Dataset Shortcuts for Interpretability: If using Sparse Autoencoder (SAE) features for safety classification or interpretability, weight the feature explanations by their LODO coefficient retention scores to filter out context-dependent dataset artifacts and surface genuinely predictive attack features.
- Calibrate Thresholds per Target Distribution: Recognize that calibration is distribution-dependent. Do not rely on standard classification thresholds (e.g., t=0.5); instead, optimize operating points on held-out data representative of the specific deployment environment.
Research context and confidence
- Evidence and verification
- Paper-reported; independent reproduction is not documented.
- Primary research source linked.
- Severity
- Not rated by this catalog.
- Source and publication type
- arXiv · Research preprint.
- Peer-review status is not provided by this source.
- Author and publication status
- Author metadata is not stored; see the primary paper.
- Threat model and attacker access
- Ability to influence untrusted model inputs or connected content.
- Related deployment categories
- Agent workflows
- Taxonomy labels only; paper-specific deployment prerequisites are not inferred.
- Affected systems
- Meta Llama-Guard-3-8B (when used in agentic/tool-use workflows) Meta Llama-Prompt-Guard-2-86M Agentic LLM pipelines relying on these conversational guardrails for input/output sanitization.
Research Paper
When Benchmarks Lie: Evaluating Malicious Prompt Classifiers Under True Distribution Shift
Primary source: arXiv. Findings are reported by the cited research and have not been independently verified.
View PaperEvidence
This entry is based on a primary research source. Its findings are paper-reported; independent reproduction and verification are not claimed.
https://arxiv.org/abs/2602.14161Related research
- Arbitrary Agent Topology Breach
Published March 1, 2026 · application-layer, prompt-layer, injection
- Cross-Environment Agent Jailbreak
Published December 1, 2025 · application-layer, prompt-layer, injection
- Agent System Orchestration Hijack
Published March 1, 2025 · application-layer, prompt-layer, injection