A Novel Security Framework against Prompt Injection Attacks
Large Language Models (LLMs) have demonstrated remarkable capabilities in natural language processing, but their widespread adoption has introduced critical security vulnerabilities, particularly prompt injection attacks-where attackers design input prompts to induce the model to generate malicious or inappropriate content, potentially leading to sensitive information leakage, execution of malicious instructions, or other security risks. Traditional defense mechanisms, which typically rely on keyword filtering or simple rule matching, struggle to cope with the increasingly complex and dynamically evolving attack methods. To address these risks, researchers have developed defense mechanisms ranging from input sanitization and adversarial training to runtime monitoring.This paper proposes a security framework based on LLMs, aiming to conduct an in-depth analysis of the threat posed by prompt injection attacks and achieve comprehensive risk monitoring of model outputs. The framework analyzes input prompts from multiple dimensions to identify malicious prompts and their potential attack behaviors while simultaneously monitoring and evaluating the output generated by the LLM. Through in-depth analysis of attack techniques and monitoring of model outputs, the proposed framework can effectively recognize and defeat various types of attacks, reduce the potential threats posed by prompt injection attacks, and ensure the security and reliability of LLMs in practical applications. Experimental results show that the framework can achieve over 93% detection accuracy.
Institutions
- China Europe International Business School (CN)
Publication Details
- Published
- 2025-05-23
- DOI
- https://doi.org/10.1109/ccai65422.2025.11189427
- Primary Topic
- Oceanographic and Atmospheric Processes
- Type
- article
- Field-Weighted Citation Impact
- 0.00