Detecting Prompt Injection Attacks in Generative AI Systems: A Hybrid SIEM and One-Class SVM Framework
Open Access
- 22 May 2026
- journal article
- research article
- Published by MDPI AG in Electronics
- Vol. 15 (11) , 2242
Abstract
Prompt injection, ranked first in the OWASP Top 10 for Large Language Model (LLM) applications, enables adversaries to override system instructions and exfiltrate sensitive information by crafting inputs that blur the boundary between data and control. While application-layer defenses such as PromptShield and Prompt-G have advanced, they operate in isolation from enterprise Security Operations Center (SOC) infrastructure and lack the session-level visibility required to detect multi-turn fragmented campaigns. This paper presents a hybrid detection framework that instruments a Phi-3 Mini Instruct gateway to emit structured telemetry, correlates events in Elastic SIEM using four expert-authored detection rules, and augments rule coverage with a One-Class Support Vector Machine (OCSVM) trained exclusively on 1200 benign interactions. Evaluated against 1100 prompts (900 malicious from CySecBench, 200 benign from Stanford Alpaca), the framework achieves a precision of 0.971, a recall of 0.810, and an F1-score of 0.883, and it reduces the Attack Success Rate (ASR) to 19.0% with a Mean Time to Detection (MTTD) of 2.3 s under the evaluated Phi-3 Mini configuration. The OCSVM layer accounts for 162 of 243 incremental true positives over the baseline, identifying attacks whose behavioral feature vectors deviate from the benign manifold. The framework is architected around OpenAI-compatible gateway telemetry and is therefore designed for vendor-neutral integration; however, broader validation across model families, prompt templates, and application domains is required before making general claims about cross-model performance or production-scale effectiveness.Keywords
Funding Information
- King Saud University (ORF-2026-2139)
This publication has 26 references indexed in Scilit:
- Exploring the Role of Artificial Intelligence in Enhancing Security Operations: A Systematic ReviewACM Computing Surveys, 2025
- Benchmarking and Defending against Indirect Prompt Injection Attacks on Large Language Models2025
- Security and Privacy Challenges of Large Language Models: A SurveyACM Computing Surveys, 2025
- AI models collapse when trained on recursively generated dataNature, 2024
- PromptShield: Deployable Detection for Prompt Injection Attacks2024
- Visibility into AI Agents2024
- Exploiting Programmatic Behavior of LLMs: Dual-Use Through Standard Security Attacks2024
- A survey on large language model (LLM) security and privacy: The Good, The Bad, and The UglyHigh-Confidence Computing, 2024
- Not What You've Signed Up For: Compromising Real-World LLM-Integrated Applications with Indirect Prompt Injection2023
- Estimating the Support of a High-Dimensional DistributionNeural Computation, 2001