patchminder
Proof of concept · GitHub CVE-2024-21513

Remote code executionin langchain_experimental.

Published 15 Jul 2024 · Updated 1 Aug 2024 · Every fact sourced

JSONCite
Is it exploited?
Not confirmed

Proof of concept public (GitHub).

Attack code is public
Severity
High 8.5
CVSSA severity score from 0 to 10. 9 and higher is critical. 3.1
Attack likelihood
Moderate
EPSSA daily score from FIRST: the chance a hole is attacked in the next 30 days. 1.9% chance in 30 days · 4 Dec 2026
Fix
Available
Upgrade to 0.0.21 or later
In plain words

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).

What to do now
  • Upgrade langchain_experimental to 0.0.21 or later.
  • Upgrade langchain-experimental (PyPI) to 0.0.21 or later.
Versions

Affected and fixed versions

Product or package
Affected
Fixed in
Source
langchain-experimental
Not confirmed
Not confirmed
CVE record
langchain_experimental
0.0.15 to before 0.0.21
0.0.21
CISA
langchain-experimental (PyPI)
before 0.0.21
0.0.21
GitHub advisory

From the CVE record, NVD and package advisories. When no source has versions yet, this table says "not confirmed" instead of guessing.

Timeline

From first report to first attacks

  1. 22 Dec 2023
    CVE ID reserved by snyk.
  2. 15 Jul 2024
    Published in the CVE List.
  3. 1 Aug 2024
    CVE record last updated.
  4. 4 Mar 2025
    First public proof of concept on GitHub.
Exploit code

Attack code anyone can find

Exploit maturity: Proof of concept (GitHub). CISA assessment (SSVC): exploitation none.

Metasploit module
None known
Nuclei scan template
None known
Exploit-DB
None known
GitHub proof of concepts
2 repositories
GitHubno warning signs foundSavageSanta11/Reproduce-CVE-2024-215130 stars · created 4 Mar 2025
GitHubno warning signs foundnskath/CVE-2024-215130 stars · created 9 Apr 2025PoC for CVE-2024-21513

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.

Related

Other langchain_experimental vulnerabilities

Same weakness: Code injection

All CWE-94 vulnerabilities

References
Cite this page

Patchminder. CVE-2024-21513: Remote code execution in langchain_experimental. https://patchminder.com/cve/cve-2024-21513/ (accessed 5 December 2026).