Real-Time Prompt Injection and Guardrails for Large Language Model Applications: A Review of Attacks, Defense Mechanisms, and Research Challenges

21 Oct

Authors: Durgude Siddhi Murlidhar, Professor Abhishek Bangar P., Professor Karad Vandana A.

Abstract: Large language models (LLMs) are now embedded in applications that read emails, documents, web pages and images and that can call external tools, which makes prompt injection one of the most important application-level security threats. Static rules and a warning in the system prompt cannot guarantee protection. This paper presents a focused narrative review of five recent primary studies (2024–2026) on prompt-injection detection, guardrails and security evaluation, supported by background works cited within them. The literature is organised into seven themes: the threat landscape; the attack taxonomy; reasoning-based detection; mutation-based universal detection; scannerbased detection; empirical attack simulation; and quantitative security assurance with guardrail requirements. The reviewed studies report that a chain-of-thought (CoT) detector reached 93.20 % accuracy and 90.13 % F1 with a 14B model on 2,176 test prompts; mutation-based detection reached 86.14 % (text) and 82.90 % (image) accuracy on an 11,000-sample dataset; an open-source scanner reached 89 % accuracy on 200 synthetic prompts; plaintext injection succeeded in 20 of 20 trials for three of four techniques on GPT-4o Mini while encoded variants failed; and a CVSSweighted assurance metric ranked four model deployments. However, the evidence is dominated by small, synthetic or single-model evaluations; detectors are compared on different datasets against different baselines; latency and query cost are rarely controlled; and none of the reviewed experiments evaluates detection together with action-level controls in a tool-calling agent. The paper contributes a thematic synthesis, a comparison of the five studies, a conceptual eight-stage layered framework and a prioritised research agenda.

DOI: https://doi.org/10.5281/zenodo.23534007