Quarkslab finds LangChain assistant leaks data via JSON format coercion

blog.quarkslab.com9 min read

Researchers discovered that a multi-agent LangChain support assistant could be forced to leak internal configurations, routing maps, safety classifier outputs, tool schemas, and sensitive knowledge base procedures simply by coercing the output format into raw JSON. The authors demonstrate that while the system prompt successfully blocked direct questions about its internal structure, asking the model to reply exclusively in raw JSON bypassed the guardrail because formatting requests are not perceived as prohibited inquiries. The investigation highlights that application developers must filter model outputs before returning them to users rather than relying solely on system prompt guardrails. Open article →