CVE-2023-36281 is a vulnerability in langchain v0.0.171 where the load_prompt function can be exploited by a remote attacker to execute arbitrary code. The vulnerability is triggered by supplying a crafted JSON file that leverages Python's subclasses mechanism or template injection, allowing execution of attacker-controlled code during prompt loading.
Mallory correlates every CVE against your assets, your vendors, and active adversary campaigns. Know which vulnerabilities matter for you, not just which ones are loud.
What it means. What to do now. Patch path, mitigations, and the assume-compromise checklist.
What an attacker gets, and what they’ve been doing with it.
If you can’t patch tonight, do this now.
Patch, then assume compromise.
1 valid exploit after Mallory filtered fakes, detection scripts, and README-only repos.
This repository is a proof-of-concept (PoC) exploit for CVE-2023-36281, targeting a Jinja2 template injection vulnerability in the LangChain library (version 0.0.171). The exploit consists of three main files: 'exploit.py', 'get_index_of_subprocess.py', and 'attack_prompt.json'. - 'get_index_of_subprocess.py' is used to determine the index of the 'subprocess.Popen' class in the current Python environment, as this index can vary between environments. The user runs this script to obtain the correct index and updates 'attack_prompt.json' accordingly. - 'attack_prompt.json' contains a malicious Jinja2 template that, when rendered by LangChain, executes an OS command (e.g., 'ls') by accessing the 'Popen' function via Python's class hierarchy. - 'exploit.py' loads the malicious prompt and triggers the template rendering, which, if the environment is vulnerable, results in command execution. The exploit demonstrates how an attacker can achieve remote code execution if they can control prompt templates rendered by LangChain with Jinja2. The repository is structured as a PoC and does not include a weaponized or automated payload. No network endpoints or external IPs are hardcoded; the main fingerprintable artifact is the malicious prompt template in 'attack_prompt.json'.
Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.
Vendor-confirmed product mapping. Mallory continuously reconciles this list against your asset inventory.
No public activity tracked yet. Mallory keeps watching.
No public activity observed for this vulnerability.
Query your assets running an affected version, and investigate the blast radius.
Every observed campaign linking this CVE to a named adversary.
Malware families riding this exploit, with evidence and IOCs.
YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.
Cross-references every affected SKU, including bundled OEM variants.
Community discussion across Reddit, Mastodon, and other social sources.