LangChain Prompt Injection: Where the Chain and Agent Abstractions Open the Surface
LangChain prompt injection surfaces in three places the framework documentation rarely highlights: the prompt template variable interpolation where user input arrives unsanitized, the agent tool output that returns to the model context, and the LangGraph state transitions that carry adversarial content across nodes. This piece walks through each surface, the framework defenses that fall short, and the inspection-layer controls that produce a deterministic decision and an audit record EU AI Act Article 12 reviewers will accept.