From Prompt Injections to SQL Injection Attacks (P2SQL)
Date: 2023-08
Affected: LangChain LLM apps, SQL backends
Attack vector: prompt-injection
Category: research
Severity: Critical

Pedro et al. demonstrate Prompt-to-SQL injection: malicious prompts cause LangChain-backed apps to emit harmful SQL that bypasses input sanitization. They evaluate seven LLMs and propose LangShield defenses. Published at ICSE 2025.


Mitigations:

Architectural layers (MAESTRO):