mlsanityData to 7 Oct 2026

FATH: Authentication-based Test-time Defense against Indirect Prompt Injection Attacks

arXiv 2410.21492 ↗First posted 28 Oct 2024cs.CR cs.CLcited by 19

On the map: LLM safety and security → Prompt injection and agent security

Abstract (arXiv)

Large language models (LLMs) have been widely deployed as the backbone with additional tools and text information for real-world applications. However, integrating external information into LLM-integrated applications raises significant security concerns. Among these, prompt injection attacks are particularly threatening, where malicious instructions injected in the external text information can exploit LLMs to generate answers as the attackers desire. While both training-time and test-time defense methods have been developed to mitigate such attacks, the unaffordable training costs associated with training-time methods and the limited effectiveness of existing test-time methods make them impractical. This paper introduces a novel test-time defense strategy, named Formatting AuThentication with Hash-based tags (FATH). Unlike existing approaches that prevent LLMs from answering additional instructions in external text, our method implements an authentication system, requiring LLMs to answer all received instructions with a security policy and selectively filter out responses to user instructions as the final output. To achieve this, we utilize hash-based authentication tags to label each response, facilitating accurate identification of responses according to the user's instructions and improving the robustness against adaptive attacks. Comprehensive experiments demonstrate that our defense method can effectively defend against indirect prompt injection attacks, achieving state-of-the-art performance under Llama3 and GPT3.5 models across various attack methods. Our code is released at: https://github.com/Jayfeather1024/FATH

Key facts. Cited by 19 papers in the map (data through 7 Oct 2026). Placed in Prompt injection and agent security, one of 12 directions in LLM safety and security. Builds on 21 of its 35 references that are in the map. First posted on arXiv 28 Oct 2024.

Builds on

21 of 35 references.

Closest ancestors · 8

Same direction, newest first

  1. 2024Defending Against Indirect Prompt Injection Attacks With Spotlighting20 Mar
  2. 2024InjecAgent: Benchmarking Indirect Prompt Injections in Tool-Integrated Large Language Model Agents5 Mar
  3. 2024StruQ: Defending Against Prompt Injection with Structured Queries9 Feb
  4. 2023Benchmarking and Defending Against Indirect Prompt Injection Attacks on Large Language Models21 Dec
  5. 2023Assessing Prompt Injection Risks in 200+ Custom GPTs20 Nov
  6. 2023Tensor Trust: Interpretable Prompt Injection Attacks from an Online Game2 Nov
  7. 2023Prompt Injection attack against LLM-integrated Applications8 Jun
  8. 2023Not what you've signed up for: Compromising Real-World LLM-Integrated Applications with Indirect Prompt Injection23 Feb

Other references · 13

  1. 2020Language Models are Few-Shot Learnerscited by 32,199
  2. 2019Sentence-BERT: Sentence Embeddings using Siamese BERT-Networkscited by 9,049
  3. 2023Judging LLM-as-a-Judge with MT-Bench and Chatbot Arenacited by 8,393
  4. 2022ReAct: Synergizing Reasoning and Acting in Language Modelscited by 8,355
  5. 2023Toolformer: Language Models Can Teach Themselves to Use Toolscited by 4,072
  6. 2023ToolLLM: Facilitating Large Language Models to Master 16000+ Real-world APIscited by 1,880
  7. 2023Gorilla: Large Language Model Connected with Massive APIscited by 1,302
  8. 2018Obfuscated Gradients Give a False Sense of Security: Circumventing Defenses to Adversarial Examplescited by 1,259
  9. 2023Mind2Web: Towards a Generalist Agent for the Webcited by 1,210
  10. 2022Ignore Previous Prompt: Attack Techniques For Language Modelscited by 760
  11. 2024A New Era in LLM Security: Exploring Security Concerns in Real-World LLM-based Systemscited by 74
  12. 2024Can LLMs Separate Instructions From Data? And What Do We Even Mean By That?cited by 70
1 more
  1. 2024WIPI: A New Web Threat for LLM-Driven Web Agentscited by 50

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2024: 1; 2025: 9; 2026: 9.

19 papers.

Sort:

By area:

  1. 2024The Task Shield: Enforcing Task Alignment to Defend Against Indirect Prompt Injection in LLM Agentscited by 89
  2. 2025Safety at Scale: A Comprehensive Survey of Large Model and Agent Safetycited by 63
  3. 2025AgentArmor: Enforcing Program Analysis on Agent Runtime Trace to Defend Against Prompt Injectioncited by 39
  4. 2025Defending against Indirect Prompt Injection by Instruction Detectioncited by 25
  5. 2026The Landscape of Prompt Injection Threats in LLM Agents: From Taxonomy to Analysiscited by 25
  6. 2026Overcoming the Retrieval Barrier: Indirect Prompt Injection in the Wild for LLM Systemscited by 16
  7. 2025System Prompt Poisoning: Persistent Attacks on Large Language Models Beyond User Injectioncited by 14
  8. 2025CommandSans: Securing AI Agents with Surgical Precision Prompt Sanitizationcited by 12
  9. 2025Invisible Prompts, Visible Threats: Malicious Font Injection in External Resources for Large Language Modelscited by 9
  10. 2026Reframing LLM Agent Security as an Agent-Human Interaction Problemcited by 8
  11. 2025Taxonomy, Evaluation and Exploitation of IPI-Centric LLM Agent Defense Frameworkscited by 7
  12. 2026LLM-enabled Applications Require System-Level Threat Monitoringcited by 2
7 more
  1. 2025OET: Optimization-based prompt injection Evaluation Toolkitcited by 1
  2. 2025Prompt-in-Content Attacks: Exploiting Uploaded Inputs to Hijack LLM Behaviorcited by 1
  3. 2026Isolation as a First-Class Principle for LLM-Agent System Safety: Concepts, Taxonomy, Challenges and Future Directionscited by 1
  4. 2026ShadowMerge: A Novel Poisoning Attack on Graph-Based Agent Memory via Relation-Channel Conflictscited by 0
  5. 2026PsychoPass: Geometric Profiling of Multi-Turn Adversarial LLM Conversationscited by 0
  6. 2026SkillShield: Prompt-Space Security Skills for LLM Coding Agentscited by 0
  7. 2026ActGuard: Pre-execution Action Auditing against Indirect Prompt Injection in LLM Agentscited by 0