#7248·chroma

[Feature Request] Ingestion-time poisoning defense via OWASP Agent Memory Guard

Author: vgudur-devCreated Jun 12, 2026Updated Sep 24, 2026

Problem

Chroma collections used for RAG and agent memory are vulnerable to document poisoning. Once adversarial content is embedded and stored, it persists and can influence all future similarity searches — injecting instructions into LLM context windows or corrupting retrieval quality.

Proposed Solution

Add optional write-time validation via OWASP Agent Memory Guard:

python
from agent_memory_guard import scan_memory

# Validate before adding to collection
for doc in documents:
    result = scan_memory(doc)
    if result.blocked:
        logger.warning(f'Blocked: {result.reason}')
        continue
    collection.add(documents=[doc], ids=[doc_id])

AMG detects:

  • Prompt injection patterns in documents
  • Embedding drift (semantically anomalous content)
  • Encoded/obfuscated payloads (entropy analysis)
  • PII/secret leakage

Why this matters now

  • arXiv:2606.04329 (June 2026): Proves memory poisoning bypasses standard prompt injection defenses
  • OWASP Incubator project, 5,400+ downloads, adopted by UK AISI
  • Could be implemented as a Chroma EmbeddingFunction wrapper or collection middleware