CriticalVulnerability
CVE-2023-39659: langchain arbitrary code execution through PythonAstREPLTool._run
- Source
- NVD(opens in a new tab)
- Identifier
- CVE-2023-39659
- Published
- Record updated
- Affected
- langchain < 0.0.325
- Fixed in
- 0.0.325
- Known exploitation
- Not listed in the CISA Known Exploited Vulnerabilities catalog at the last check.
- EPSS
- 1.5%
Summary
CVE-2023-39659 affects langchain (langchain-ai) v.0.0.232 and earlier. A remote attacker can execute arbitrary code by sending a crafted script to the PythonAstREPLTool._run component. The source classifies the weakness as CWE-74, Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection').
Mitigation
The source does not state a fix yet. Check the original advisory for updates.
Related items
- HighCVE-2026-106119: LangChain MongoDBChatMessageHistory query injection via session identifierSame vendor · NVD/CVE Database
- LowGHSA-5x6v-p487-7qh2: LangChain: RediSearch Filter Injection via Unescaped Tag/Text ValuesSame vendor · GitHub Advisory Database
- HighGHSA-fvww-7h3r-vfhp: LangGraph SDK custom auth silently ignores actions= on resource decoratorsSame vendor · GitHub Advisory Database
- HighCVE-2026-72848: SitemapLoader nested sitemap entries bypass restrict_to_same_domainSame vendor · NVD/CVE Database
- HighGHSA-533j-2v4q-mw5h: LangChain MongoDB has NoSQL Operator Injection in MongoDBSaver.list() leading to cross-tenant data exposureSame vendor · GitHub Advisory Database