This is the story of how I discovered CVE-2024-28088, a URI traversal vulnerability in LangChain’s configuration loading mechanism that led to full API token leakage, and in some cases, even remote code execution. More importantly, it’s a lesson in trust boundaries, path sanitization, and how “convenience” can quietly become a security liability.
LangChain is widely used to compose complex LLM-based applications. Its modularity and the existence of a central LangChain Hub make it easy for developers to reuse and share chains, prompts, and agents. But what if that hub, or rather, the logic meant to protect its boundaries, could be bypassed?