INCIDENT MAP

Browse / Tool and Agent Misuse / CVE-2023-39659

LangChain vulnerable to arbitrary code execution

CVE-2023-39659 ยท 2023-08-15 critical

Class
Tool and Agent Misuse (filed by a model that read the advisory)
Technique
Code and command execution
Also involves
Direct Prompt Injection
Affected
langchain (PyPI)
Gets past
Sandbox or allowlist
CVSS
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS
1.5% chance of exploitation in 30 days

How it works, in short

The Python AST REPL tool runs supplied scripts without adequate restriction, letting a crafted script execute arbitrary code on the host. (Our summary, written by a model. The source text is below.)

Details

An issue in langchain langchain-ai before version 0.0.325 allows a remote attacker to execute arbitrary code via a crafted script to the PythonAstREPLTool._run component.

References

Source: GitHub Advisory Database, used under CC BY 4.0.