SQL Injection
A prevalent web security vulnerability in which an attacker inserts malicious SQL statements into user input fields, causing the backend database engine to execute unintended queries. Successful exploitation can result in data breaches, authentication bypass, or unauthorized data modification.
Core Facts
Prompt注入(Prompt Injection)是针对大语言模型应用的安全威胁,攻击者通过在输入中嵌入恶意指令试图覆盖系统原有行为约束
Prompt Injection is a security attack method targeting AI applications, analogous to SQL injection in traditional web development.
Prompt injection is essentially an architectural flaw in which large language models cannot distinguish data from instructions, analogous to traditional SQL injection in which the database engine confuses data with SQL instructions.
Timeline (last 90 days)
A database dump/data breach refers to an attacker gaining read and write access to a database through SQL injection, weak passwords, exploitation of known vulnerabilities, or other means, and exporting user tables.
Unlike traditional SQL injection, prompt injection has no strict syntactic boundaries, making defense harder and often requiring a combination of layered measures such as input filtering, instruction isolation and output validation.
A WAF (Web Application Firewall) is a security device or software deployed in front of web servers that intercepts known attack patterns by inspecting the characteristics of HTTP requests.
Unlike SQL injection, prompt injection has no simple escaping or parameterization scheme, because there is no formal boundary between natural language instructions and data.
The UK National Cyber Security Centre (NCSC) points out that language models have no equivalent isolation mechanism, and prompt injection may never be completely fixed the way SQL injection has been.
Input validation is used to prevent attacks such as SQL injection and cross-site scripting (XSS), and the principle is to trust no data from the client side.
Building SQL queries with f-strings creates SQL injection risk; bound parameters or text(...).bindparams() should be used instead.
Similar to SQL injection, prompt injection exploits the system's confusion between 'input' and 'instruction', but the difference is that LLMs have no strict data/code separation mechanism, and all text shares the same semantic channel.
Prompt injection currently has no 'parameterization' fix like SQL parameterized queries, because the model is architecturally designed to receive system instructions, user input, and external content as the same set of tokens.
The term Prompt Injection entered the security research field around 2022 with the popularization of conversational models such as ChatGPT, and its naming borrows from SQL injection in traditional Web security.
15 more timeline events
All Facts (20)
Prompt注入(Prompt Injection)是针对大语言模型应用的安全威胁,攻击者通过在输入中嵌入恶意指令试图覆盖系统原有行为约束
90%VerifiedPrompt Injection is a security attack method targeting AI applications, analogous to SQL injection in traditional web development.
85%VerifiedPrompt injection is essentially an architectural flaw in which large language models cannot distinguish data from instructions, analogous to traditional SQL injection in which the database engine confuses data with SQL instructions.
80%VerifiedVulnerabilities such as SQL injection, XSS, and SSRF have long occupied the OWASP Top 10 security risk list.
75%VerifiedThe principle of SQL injection is that an attacker inserts malicious SQL statement fragments into user input fields; when the backend directly concatenates user input into database query statements, it is executed by the database engine, leading to data leakage, authentication bypass, or even database write operations.
70%VerifiedA WAF (Web Application Firewall) is a security device or software deployed in front of web servers that intercepts known attack patterns by inspecting the characteristics of HTTP requests.
65%VerifiedPrompt injection is essentially an instruction hijacking attack that exploits the structural flaw of LLMs being unable to distinguish system instructions from user data at the semantic level, and is conceptually similar to SQL injection.
65%VerifiedSQL injection can fundamentally isolate data from instructions through parameterized queries, whereas there is currently no equivalent "parameterized" solution for the LLM inference process.
65%VerifiedPrompt injection shares a structural analogy with SQL injection vulnerabilities: the latter exploits a database's inability to distinguish SQL code from data strings, while the former exploits an LLM's inability to distinguish meta-instructions from the content being processed.
65%UnverifiedLarge language models cannot reliably distinguish the boundary between system instructions and user/external content during inference—this is a fundamental limitation of prompt injection, similar in principle to SQL injection.
60%UnverifiedA database dump/data breach refers to an attacker gaining read and write access to a database through SQL injection, weak passwords, exploitation of known vulnerabilities, or other means, and exporting user tables.
50%UnverifiedUnlike traditional SQL injection, prompt injection has no strict syntactic boundaries, making defense harder and often requiring a combination of layered measures such as input filtering, instruction isolation and output validation.
50%UnverifiedUnlike SQL injection, prompt injection has no simple escaping or parameterization scheme, because there is no formal boundary between natural language instructions and data.
50%UnverifiedThe UK National Cyber Security Centre (NCSC) points out that language models have no equivalent isolation mechanism, and prompt injection may never be completely fixed the way SQL injection has been.
50%UnverifiedInput validation is used to prevent attacks such as SQL injection and cross-site scripting (XSS), and the principle is to trust no data from the client side.
50%UnverifiedBuilding SQL queries with f-strings creates SQL injection risk; bound parameters or text(...).bindparams() should be used instead.
50%UnverifiedSimilar to SQL injection, prompt injection exploits the system's confusion between 'input' and 'instruction', but the difference is that LLMs have no strict data/code separation mechanism, and all text shares the same semantic channel.
50%UnverifiedPrompt injection currently has no 'parameterization' fix like SQL parameterized queries, because the model is architecturally designed to receive system instructions, user input, and external content as the same set of tokens.
50%UnverifiedThe term Prompt Injection entered the security research field around 2022 with the popularization of conversational models such as ChatGPT, and its naming borrows from SQL injection in traditional Web security.
50%UnverifiedIf the tools exposed by an MCP server allow the model to pass in arbitrary SQL statements, this is essentially a SQL injection vulnerability with the LLM as the intermediary.
50%