菜单

关于 🐙 GitHub
arXiv 提交日期: 2026-05-11
📄 Abstract - When Prompts Become Payloads: A Framework for Mitigating SQL Injection Attacks in Large Language Model-Driven Applications

Natural language interfaces to structured databases are becoming increasingly common, largely due to advances in large language models (LLMs) that enable users to query data using conversational input rather than formal query languages such as SQL. While this paradigm significantly improves usability and accessibility, it introduces new security risks, particularly the amplification of SQL injection vulnerabilities through the prompt-to-SQL translation process. Malicious users can exploit these mechanisms by crafting adversarial prompts that manipulate model behavior and generate unsafe queries. In this work, we propose a multi-layered security framework designed to detect and mitigate LLM-mediated SQL injection attacks. The framework integrates a front-end security shield for prompt sanitization, an advanced threat detection model for behavioral and semantic anomaly identification, and a signature-based control layer for known attack patterns. We evaluate the proposed framework under diverse and realistic attack scenarios, including prompt injection, obfuscated SQL payloads, and context-manipulation attacks. To ensure robustness, we generate and curate a comprehensive benchmark dataset of adversarial prompts and assess performance across a fine-tuned LLM configuration. Experimental results demonstrate that the proposed approach achieves high detection accuracy while maintaining low false-positive rates, significantly improving the secure deployment of LLM-powered database applications.

顶级标签: llm natural language processing security
详细标签: sql injection prompt injection security framework adversarial attacks database security 或 搜索:

当提示成为攻击载荷:大语言模型驱动应用中SQL注入攻击的缓解框架 / When Prompts Become Payloads: A Framework for Mitigating SQL Injection Attacks in Large Language Model-Driven Applications


1️⃣ 一句话总结

本文提出了一种多层安全框架,通过前端提示净化、行为异常检测和已知攻击签名匹配,来防止用户利用自然语言提示诱导大语言模型生成恶意SQL查询,从而有效防御新型SQL注入攻击。

源自 arXiv: 2605.10176