Documented Incident · INC-2024-38459 · High severity
LangChain Experimental Package Exposing Python REPL Without Explicit Opt-In
CVE-2024-38459 highlighted insecure-by-default tool exposure in `langchain-experimental`, where the `PythonREPLTool` permitted arbitrary host Python execution without requiring an explicit developer opt-in flag. Applications instantiating experimental agent toolkits could expose full OS shell and filesystem capabilities to end-user prompts unintentionally. Prompt injection or direct user queries against the agent could execute arbitrary host scripts without sandboxing. Maintainers introduced mandatory explicit `allow_dangerous_code` opt-in gates and documentation warnings while advising strict container isolation.
Incident dossier metadata
- Case ID
INC-2024-38459- Classification
- Incident
- Date
- Severity
- High
- Sector
- Software Development & AI Tooling
- Attack vector
- Tool/MCP Abuse
- System type
- Code-Interpreter & REPL-Equipped LLM Frameworks
- CVE / reference
CVE-2024-38459- Reference URI
https://nvd.nist.gov/vuln/detail/CVE-2024-38459
Defensive takeaway
Default dangerous code-execution tools to disabled, require explicit opt-in flags, and execute interpreter tools strictly inside ephemeral network-disabled sandboxes.
Mapped AI security techniques
- Command and Scripting Interpreter AML.T0050
- AI Agent Tool Invocation AML.T0053
- Generate Malicious Commands AML.T0102
- Machine Compromise: Local AI Agent AML.T0112.000
Mapped defensive controls
- Enforce Access Controls for AI Agent Tools AML.M0028
- Human In-the-Loop for AI Agent Actions AML.M0029
- Segmentation of AI Agent Components AML.M0032
Source citation records
- NVD Record CVE-2024-38459: LangChain Experimental Unprotected Python REPL Exposure · NIST National Vulnerability Database (NVD) ·