Threat

CVE-2024-8309: SQL Injection in langchain-ai/langchain

Page published

Earliest dated coverage: 29 Oct 2024 · First observed: 12 Oct 2026 · Latest dated coverage: 29 Oct 2024

Coverage timeline

29 Oct 2024kitploit.com

Single-source advisory — one report is available.

Why it matters

CVE-2024-8309 shows how prompt injection in a widely used LLM framework like LangChain can be escalated into unauthorized database manipulation and data exfiltration, a direct threat to RAG and agentic applications built on it.

CVE-2024-8309 is a critical (CVSS 9.8) vulnerability in the GraphCypherQAChain class of langchain-ai/langchain version 0.2.5 that allows SQL injection through prompt injection against Neo4j databases. Attackers can exfiltrate data, create/update/delete nodes and relationships without authorization, cause denial of service, and breach multi-tenant boundaries; a Docker-based proof-of-concept with FastAPI and Streamlit is available.