paper-with-me

홈 › Papers

PIShield: Detecting Prompt Injection Attacks via Intrinsic LLM Features

2025-10-15 · Wei Zou, Yupei Liu, Yanting Wang, Ying Chen, Neil Gong, Jinyuan Jia arxiv

LLM-integrated applications are vulnerable to prompt injection attacks, where an attacker contaminates the input to inject malicious instructions, causing the LLM to follow the attacker's intent instead of the original user's. Existing prompt injection detection methods often have sub-optimal performance and/or high computational overhead. In this work, we propose PIShield, an effective and efficient detection method based on the observation that instruction-tuned LLMs internally encode distinguishable signals for prompts containing injected instructions. PIShield leverages residual-stream representations and a simple linear classifier to detect prompt injection, without expensive model fine-tuning or response generation. We conduct extensive evaluations on a diverse set of short- and long-context benchmarks. The results show that PIShield consistently achieves low false positive and false negative rates, significantly outperforming existing baselines. These findings demonstrate that internal representations of instruction-tuned LLMs provide a powerful and practical foundation for prompt injection detection in real-world applications.

📄 PDF Abstract BibTeX arXiv:2510.14005

Code (0)

등록된 구현이 없습니다.

Tasks

Response Generation

Similar Papers 제목 키워드 기반

UniGuardian: A Unified Defense for Detecting Prompt Injection, Backdoor Attacks and Adversarial Attacks in Large Language Models

2025-02-18 · Huawei Lin, Yingjie Lao, Tong Geng, Tan Yu 외

Large Language Models (LLMs) are vulnerable to attacks like prompt injection, backdoor attacks, and adversarial attacks, which manipulate prompts or models to generate harmful outputs. In this paper, departing from tradi…

Text Generation

WebSentinel: Detecting and Localizing Prompt Injection Attacks for Web Agents

2026-02-03 · Xilong Wang, Yinuo Liu, Zhun Wang, Dawn Song 외 arxiv

Prompt injection attacks manipulate webpage content to cause web agents to execute attacker-specified tasks instead of the user's intended ones. Existing methods for detecting and localizing such attacks achieve limited …

Detecting Prompt Injection Attacks Against Application Using Classifiers

2025-12-14 · Safwan Shaheer, G. M. Refatul Islam, Mohammad Rafid Hamid, Md. Abrar Faiaz Khan 외 arxiv

Prompt injection attacks can compromise the security and stability of critical systems, from infrastructure to large web applications. This work curates and augments a prompt injection dataset based on the HackAPrompt Pl…

Investigating Detection and Obfuscation of Prompt Injection Attacks Against Software Reverse Engineering AI Agents

2026-05-29 · Brian Crawford, Patrick McClure arxiv

Agentic software reverse engineering systems are vulnerable to prompt injection attacks placed into the source code of executable binary files. This research demonstrates defensive tactics for detecting the presences of …

WAInjectBench: Benchmarking Prompt Injection Detections for Web Agents

2025-10-01 · Yinuo Liu, Ruohan Xu, Xilong Wang, Yuqi Jia 외 arxiv

Multiple prompt injection attacks have been proposed against web agents. At the same time, various methods have been developed to detect general prompt injection attacks, but none have been systematically evaluated for w…