Remote code executionin langchain_experimental.
Proof of concept public (GitHub).
Versions of the package langchain-experimental from 0.0.15 and before 0.0.21 are vulnerable to Arbitrary Code Execution when retrieving values from the database, the code will attempt to call 'eval' on all values. An attacker can exploit this vulnerability and execute arbitrary python code if they can control the input prompt and the server is configured with VectorSQLDatabaseChain.**Notes:**Impact on the Confidentiality, Integrity and Availability of the vulnerable component:Confidentiality: Code execution happens within the impacted component, in this case langchain-experimental, so all resources are necessarily accessible.Integrity: There is nothing protected by the impacted component inherently. Although anything returned from the component counts as 'information' for which the trustworthiness can be compromised.Availability: The loss of availability isn't caused by the attack itself, but it happens as a result during the attacker's post-exploitation steps.Impact on the Confidentiality, Integrity and Availability of the subsequent system:As a legitimate low-privileged user of the package (PR:L) the attacker does not have more access to data owned by the package as a result of this vulnerability than they did with normal usage (e.g. can query the DB).
- Upgrade langchain_experimental to 0.0.21 or later.
- Upgrade langchain-experimental (PyPI) to 0.0.21 or later.
Affected and fixed versions
From the CVE record, NVD and package advisories. When no source has versions yet, this table says "not confirmed" instead of guessing.
From first report to first attacks
- 22 Dec 2023CVE ID reserved by snyk.
- 15 Jul 2024Published in the CVE List.
- 1 Aug 2024CVE record last updated.
- 4 Mar 2025First public proof of concept on GitHub.
Attack code anyone can find
Exploit maturity: Proof of concept (GitHub). CISA assessment (SSVC): exploitation none.
Listed so defenders can judge how urgent this is and test systems they are authorised to test. Patchminder does not host exploit code; links open the source page. Labels for GitHub repositories come from their public details and are never a promise about the code. Run anything only in an isolated lab.
Report a link
Other langchain_experimental vulnerabilities
Same weakness: Code injection
Patchminder. CVE-2024-21513: Remote code execution in langchain_experimental. https://patchminder.com/cve/cve-2024-21513/ (accessed 5 December 2026).