Back to search

Eastern Washington University

Mitigating Prompt Injections in LLM Applications: A Detection and Filtering Framework

Abstract

dc:description.abstract

As Large Language Models (LLMs) become increasingly popular and are integrated into autonomous agent systems, this has led to a rise in new security threats. These security risks exploit natural-language interfaces to override system controls, manipulate tool usage, bypass security policy, or provide unauthorized information. As we become more dependent on LLM-driven applications, these vulnerabilities become greater as models gain access to external tools, Application Programming Interfaces (APIs), and workflow automation. This research investigates these vulnerabilities by examining current defense strategies and developing a modular filtering system that identifies a wider range of prompt-injection patterns that traditional rule-based systems may miss. This was accomplished by designing a multi-layer detection architecture consisting of four components: banned-word matching, regex pattern detection, an LLM-based contextual system, and Prompt Guard - a model specifically tailored for identifying prompt injections. Testing on 700 maliciously crafted prompts achieved 97-100\% detection rates, with performance varying across multiple artificial intelligence models, including Grok, Gemini, DeepSeek, Claude, Llama, and Cogito, via different API providers such as OpenRouter and TogetherAI. Evidence suggests that although rule-based detectors are highly effective at identifying known patterns, machine learning and LLM components provide the ability to analyze a prompt in context, resulting in a higher detection rate. The current implementation focuses on a single conversational agent with the plan to expand the filtering system to different deployment contexts. Future work will focus on creating an agent-specific filter configuration for each agent, taking into consideration the different risk profiles and interaction behaviors.

Degree

thesis:*
Name thesis:degree_name
Master of Science (MS) in Computer Science
Level thesis:degree_level
Thesis: EWU Only
Discipline thesis:degree_discipline
Computer Science and Electrical Engineering

Author and committee

dc:creator, dc:contributor.*
Author dc:creator
  • Stewart, Mikayla
Contributors dc:contributor
  • Sanmeet Kaur
  • Chris Cain
  • Lynnae Daniels

Subjects

dc:subject × 5

Rights

dc:rights
Statement dc:rights
  • Access restricted for 2 years to EWU users with an active EWU NetID

Identifiers

dc:identifier.*
Repository record dc:identifier
https://dc.ewu.edu/theses/1035

Chain of custody

source
Harvested from
Eastern Washington University
Base URL
dc.ewu.edu/do/oai/
Last updated
2026-11-19
Source record
OAI-PMH GetRecord
citation

Stewart, Mikayla. Mitigating Prompt Injections in LLM Applications: A Detection and Filtering Framework. Thesis: EWU Only thesis, https://dc.ewu.edu/theses/1035