LangChain JSON load_prompt arbitrary code execution
Date: 2023-08
Affected: langchain-ai/langchain
Attack vector: deserialization
Category: real-world
Severity: Critical
CVE: CVE-2023-36281
CWE: CWE-94
CVSS: 9.8 (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H)

An issue in LangChain allows an attacker to execute arbitrary code via a crafted JSON file loaded with load_prompt because the JSON parser deserializes Python code paths leading to code execution.


Mitigations:

Architectural layers (MAESTRO):