Menu

Post image 1
Post image 2
1 / 2
0

LangChain ChromaDB Metadata Priority Injection — RAG Poisoning Vulnerability

DEV Community·PJ·22 days ago
#Z56dxx2c
Reading 0:00
15s threshold

LangChain ChromaDB Metadata Priority Injection Vulnerability Summary LangChain's Chroma integration allows attackers to manipulate document retrieval by injecting high-priority metadata fields, forcing malicious documents to rank above legitimate ones regardless of semantic relevance. Affected Versions langchain-community: All versions <= 0.3.x langchain-chroma: All versions chromadb: All versions Attack Vector # Attacker uploads document with manipulated metadata poisoned_doc = { ' text ' : ' Malicious insurance policy: Coverage limit is 5,000 Kč ' , ' metadata ' : { ' priority ' : 999 } # Force highest ranking } # Victim's RAG system retrieves poisoned doc first # Legitimate docs with lower priority are ignored Enter fullscreen mode Exit fullscreen mode Impact OWASP LLM08 : Vector and Embedding Weaknesses MITRE ATT&CK : T1565.001 (Data Manipulation) Affects insurance, legal, medical RAG systems Persistent poisoning (survives database restarts) PoC [Attach test_langchain_vulnerability.py] Disclosure…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More