Documented Incident · INC-2023-36258 · Critical severity

LangChain PALChain Unsandboxed Python Exec Arbitrary Code Execution

CVE-2023-36258 disclosed critical remote code execution in LangChain's Program-Aided Language Model (`PALChain`) implementation prior to v0.0.236. `PALChain` prompts an LLM to synthesize Python helper functions for reasoning tasks and executes the emitted code via `exec()` in the application runtime. Prompt manipulation easily redirected generated Python functions to execute arbitrary shell commands and exfiltrate environment credentials. Following disclosure, the component was isolated behind explicit opt-in warnings and separated from untrusted production defaults.

Incident dossier metadata

Case ID
INC-2023-36258
Classification
Incident
Date
Severity
Critical
Sector
Software Development & AI Tooling
Attack vector
Tool/MCP Abuse
System type
Program-Aided Language Model Chains
CVE / reference
CVE-2023-36258
Reference URI
https://nvd.nist.gov/vuln/detail/CVE-2023-36258

Inspect INC-2023-36258 in Interactive Incidents & Cases Hub

Defensive takeaway

Isolate Program-Aided LLM code execution inside ephemeral OS/WASM sandboxes with no network egress or secret environment variables.

Mapped AI security techniques

Mapped defensive controls

Source citation records