Documented Incident · INC-2024-3098 · High severity
LlamaIndex PGVectorStore SQL Injection via Unsanitized Metadata Filter Keys
CVE-2024-3098 exposed a SQL injection vulnerability in LlamaIndex's `PGVectorStore` integration prior to v0.10.24 when building metadata filter clauses. Filter key names supplied via query metadata were interpolated into raw PostgreSQL JSONB queries without identifier validation or parameterization. Attackers able to influence metadata filter keys in RAG endpoints could execute arbitrary SQL expressions to leak cross-tenant vector embeddings or corrupt table contents. Maintainers resolved the flaw by sanitizing and parameterizing metadata filter keys.
Incident dossier metadata
- Case ID
INC-2024-3098- Classification
- Incident
- Date
- Severity
- High
- Sector
- Enterprise Data & Analytics
- Attack vector
- Data Exfiltration
- System type
- PostgreSQL RAG Vector Stores
- CVE / reference
CVE-2024-3098- Reference URI
https://nvd.nist.gov/vuln/detail/CVE-2024-3098
Defensive takeaway
Allowlist metadata filter keys against schema column identifiers and bind all RAG filter values via parameterized SQL queries.
Mapped AI security techniques
- Exploit Public-Facing Application AML.T0049
- Data from AI Services: RAG Databases AML.T0085.000
- Exfiltration via AI Agent Tool Invocation AML.T0086
Mapped defensive controls
- Control Access to AI Models and Data at Rest AML.M0005
- Vulnerability Scanning AML.M0016
- Input and Output Validation for AI Agent Components AML.M0033
Source citation records
- NVD Record CVE-2024-3098: LlamaIndex PGVectorStore SQL Injection · NIST National Vulnerability Database (NVD) ·