Incident report

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 record

Reported
Severity
High
Vector
Data Exfiltration
Affected system type
PostgreSQL RAG Vector Stores
Reference
CVE-2024-3098
Reference URI
https://nvd.nist.gov/vuln/detail/CVE-2024-3098

Inspect in Interactive Incidents Hub

Defensive lesson

Allowlist metadata filter keys against schema column identifiers and bind all RAG filter values via parameterized SQL queries.

Referenced techniques