EXECUTIVE SUMMARY:
A critical serialization flaw CVE-2025-68664 with a CVSS score of 9.3 was discovered in the LangChain open-source framework that underpins many LLM-powered applications, where its dumps()/dumpd() functions fail to properly escape certain dictionary keys, allowing malicious “lc” entries to be treated as legitimate objects and opening the door for attackers to exploit prompt injection to steal sensitive environment variables or trigger unsafe operations; this vulnerability affects LangChain Core versions < 0.3.81 and LangChain versions ≥ 1.0.0 and < 1.2.5.
RECOMMENDATION:
We strongly recommend you update LangChain Core to version 0.3.81 or LangChain to version 1.2.5.
REFERENCES:
The following reports contain further technical details: