LangChain flaw exposes agent secrets via serialization injection
20 days ago • ai-security
On December 23, 2025, LangChain published a security advisory and assigned CVE-2025-68664 to a critical serialization-injection flaw in langchain-core’s dumps/loads APIs. Reported widely as “LangGrinch,” the flaw allows crafted serialized payloads returned to an agent to cause secret exfiltration when the library deserializes user-controlled data (GitHub advisory; Cyata Security).
The issue arises from unsafe handling of serialized objects in langchain-core’s dumps/loads paths, which lets attackers inject malicious objects during deserialization. The attack chain often begins with prompt manipulation that causes an agent to produce or load crafted serialized content; if exploited, loading those objects can lead to remote code execution (RCE) on the host running the agent (SiliconANGLE; The Hacker News).
LangChain’s advisory lists the primary mitigations: stop loading untrusted serialized data, apply vendor patches or updated releases, and rotate any exposed credentials. Organizations should inventory langchain-core usage, block public uploads of serialized artifacts, and treat agent-facing inputs as untrusted until patched (GitHub advisory; The Hacker News).
Why It Matters
- Deserializing agent-generated or user-supplied objects can expose API keys, tokens, and other secrets from running systems.
- Deserialization-based RCE can escalate a data leak into full host compromise—treat this as a high-priority incident response item.
- Immediately patch or remove unsafe dumps/loads usage and rotate any credentials that may have been exposed before fixes were applied.
- Harden agent I/O: block or validate serialized uploads, sandbox deserialization where possible, and restrict agent permissions to limit blast radius.
Trust & Verification
Source List (4)
Sources
- GitHub (langchain-ai/langchain security advisories)OfficialDec 23, 2025
- Cyata SecurityOfficialDec 25, 2025
- SiliconANGLETier-1Dec 25, 2025
- The Hacker NewsTier-1Dec 26, 2025
Fact Checks (4)
CVE-2025-68664 (LangGrinch) was disclosed by LangChain on 2025-12-23 (VERIFIED)
The vulnerability allows attackers to exfiltrate secrets via langchain-core dumps/loads serialization APIs (VERIFIED)
Loading crafted serialized objects can lead to remote code execution (RCE) (VERIFIED)
Attack chains often begin with prompt manipulation (prompt injection) that causes agents to produce or load malicious serialized content (VERIFIED)