I'll Have a Raw JSON, Please: Leaking a LangChain Assistant Through Format Coercion

Introduction During a red team exercise, we were able to dump the structure, agents, knowledge base and safety flags of a chatbot built for customer assistance. How did we do it? After a lot of tries, tools and ad-hoc attacks, we made it with a simple technique, format coercion, and a little help from LangChain. In this article, we'll describe how. Nowadays, more and more companies resort to chatbots to streamline their procedures, especially for customer assistance. Although these systems often look well implemented, sometimes even running on local models, they are built (most of the time) with native access to documents and procedures (sometimes even more). The assistant we tested was no
…