Detection and Mitigation of Prompt Injection and Memory Poisoning Attacks in Agentic AI Systems

Authors

  • Ali Asad Mumtaz Department of Computer Science & IT, Baba Guru Nanak University, Nankana Sahib, Pakistan Author
  • Muhammad Atif Department of Computer Science & IT, Baba Guru Nanak University, Nankana Sahib, Pakistan Author
  • Uzair Ashraf Department of Computer Science & IT, Baba Guru Nanak University, Nankana Sahib, Pakistan Author
  • Maira Sattar Department of Computer Science, School of Systems and Technology, University of Management and Technology (UMT), Lahore, Pakistan Author
  • Shahzad Nazir*  Department of Computer Science & IT, Baba Guru Nanak University, Nankana Sahib, Pakistan Author

DOI:

https://doi.org/10.66021/

Keywords:

— agentic AI, large language models, prompt injection, memory poisoning, LLM agents, RAG security, provenance, trustworthy AI, adversarial machine learning.

Abstract

large language model (LLM) agents have tended to integrate external tools, retrieval-augmented generation (RAG), and persistent memory with natural-language reasoning. These features make tasks more autonomous but also make them more vulnerable: prompt injection can change an agent's direction during a session and memory poisoning can carry malicious input at later tasks and tool calls. In this paper, we present TAMGuard: A Trust-Aware Framework for Prompt Injection and Memory Poisoning Detection and Mitigation in Agentic AI systems. TAMGuard combines input canonicalization, a transformer-based semantic detector, a provenance-aware trust scoring model, a consistency checker based on trusted memory, quarantined memory writes, trust-aware retrieval and a risk-sensitive tool-action gate. TAMGuard has been tested with Agent Security Bench; external testing also has been conducted with AgentDojo and InjecAgent for direct, observation-based, indirect, and memory-oriented attacks. Experimental results demonstrate that TAMGuard achieves a 95.31% accuracy, 95.30% macro F1, and 98.70% macro AUROC for three-way classification of benign, prompt-injection, and memory-poisoning instances, and only lowers the residual attack success rate to 4.7% while maintaining a benign task utility of 94.2%. Based on the results of the ablation analysis, it can be said that the three are complementary protection: (1) provenance, (2) memory consistency, (3) quarantine, and (4) action authorization. This study proposes a model to enforce agent security throughout the information lifecycle, not just on the boundary of the prompt.

Downloads

Download data is not yet available.

Downloads

Published

2026-02-19

How to Cite

Detection and Mitigation of Prompt Injection and Memory Poisoning Attacks in Agentic AI Systems. (2026). Annual Methodological Archive Research Review, 4(2), 653-668. https://doi.org/10.66021/

Similar Articles

1-10 of 1670

You may also start an advanced similarity search for this article.