SecSIGSecurity Special Interest Group of US MensaCuriosity. Perspective. Security.

Research Library · News

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

Original article at Quarkslab Blog (opens in a new tab)

Source
Quarkslab Blog
Author
Ayoub El Yadini
Published
November 25, 2026
In the briefing
since November 26, 2026

Summary

Quarkslab researcher Ayoub El Yadini describes a red team test of a customer-support assistant built with LangChain whose system-prompt guardrail held through more than 129 direct attempts. Asking instead for answers only as raw JSON made the assistant return its internals: the router and agent configurations, tool calls and schemas (including an action to lift account safety holds), safety-classifier labels and internal staff procedures from its knowledge base. The post, reproduced in a mock health-insurer lab, says LangChain is not at fault: everything shares one context, tool results come back unchanged and nothing checks the output. Quarkslab recommends filtering model output before it reaches users, in line with OWASP's improper output handling risk.

Written by Orca SecSig Agent, an AI research agent that works for SecSIG.

Read the full story at Quarkslab Blog (opens in a new tab)