Home / langchain-experimental / langchain-experimental / CVE-2024-21513
CVE-2024-21513: is it exploited, and which versions of langchain-experimental are affected and fixed?
CVE-2024-21513 is a code injection (remote code execution) vulnerability in langchain-experimental. It is not known to be exploited: it is not in CISA's Known Exploited Vulnerabilities catalog (catalog 2026.11.30, read December 3, 2026, 17:39 UTC). Affected: langchain-experimental before 0.0.21 (GitHub advisory GHSA-cgcg-p68q-3w7v). Fixed in 0.0.21 (GitHub advisory GHSA-cgcg-p68q-3w7v). Severity: High (8.5, CVSS 3.1, from snyk).
Data checked December 3, 2026: last read CISA KEV December 3, 2026, 17:39 UTC, CVE record November 19, 2026, 07:11 UTC and NVD November 19, 2026, 07:28 UTC.
What is CVE-2024-21513?
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). The unintended action that one can perform by breaking out of the app environment and exfiltrating files, making remote connections etc. happens during the post exploitation phase in the subsequent system - in this case, the OS. AT:P: An attacker needs to be able to influence the input prompt, whilst the server is configured with the VectorSQLDatabaseChain plugin.
From the CVE record by snyk, last updated August 1, 2024, 22:20 UTC.
Which versions are affected, and which fix it?
| Vendor | Product | Affected | Fixed or not affected from |
|---|---|---|---|
| langchain-experimental | from 0.0.15 before 0.0.21 | 0.0.21 |
As the CVE record by snyk states it, last updated August 1, 2024. Version ranges are the CNA's; a version the record calls not affected is usually the fix.
Which packages are affected, and in which version is each fixed?
| Ecosystem | Package | Affected | Fixed in | Advisory |
|---|---|---|---|---|
| PyPI | langchain-experimental | < 0.0.21 | 0.0.21 | GHSA-cgcg-p68q-3w7v |
GitHub Advisory Database, reviewed advisories (CC BY 4.0); advisory updated November 18, 2024. Summary: langchain-experimental vulnerable to Arbitrary Code Execution.
Which products and versions does the NVD list as affected?
| Vendor | Product | Versions | Type |
|---|---|---|---|
| langchain | langchain-experimental | from 0.0.15 before 0.0.21 | application |
NVD analysis (status Modified), last modified June 17, 2026, 07:09 UTC.
How severe is CVE-2024-21513?
| Score | Version | Vector | Source |
|---|---|---|---|
| High 8.5 | CVSS 3.1 | CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H/E:P | snyk |
| High 8.5 | CVSS 3.1 | CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H | NVD |
Each score is shown as its source gave it: the CNA that wrote the record, CISA's ADP (vulnrichment) and the NVD. They can differ.
What the ratings mean: in CVSS 3 and 4, scores run from 0 to 10, with Low 0.1 to 3.9, Medium 4.0 to 6.9, High 7.0 to 8.9 and Critical 9.0 to 10.0. CVSS 2 has no Critical band: its High runs from 7.0 to 10.0. The vector lists how the flaw is reached (network, local), what an attacker needs (privileges, a user's click) and what it can harm.
Is CVE-2024-21513 exploited in the wild?
- CISA KEV
- Not listed (catalog 2026.11.30)
- CISA SSVC
- Exploitation: none; automatable: no; technical impact: total (CISA ADP, July 15, 2024)
- EPSS
- 1.89% probability of exploitation activity in the next 30 days, percentile 80.3 (FIRST EPSS, scores of December 3, 2026)
What kind of flaw is it?
- CWE-94 Improper Control of Generation of Code
Where are the vendor advisories and references?
- https://security.snyk.io/vuln/SNYK-PYTHON-LANGCHAINEXPERIMENTAL-7278171
- https://github.com/langchain-ai/langchain/blob/672907bbbb7c38bf19787b78e4ffd7c8a9026fe4/libs/experimental/langchain_experimental/sql/vector_sql.py%23L81
- https://github.com/langchain-ai/langchain/commit/7b13292e3544b2f5f2bfb8a27a062ea2b0c34561
Who found and reported it?
- Rory McNamara (Snyk Security Research) (finder)
As published in the CVE record; contact details are removed.
When was it published, and where is the official record?
- Reserved
- December 22, 2023
- Published
- July 15, 2024, 05:00 UTC
- CVE record updated
- August 1, 2024, 22:20 UTC by snyk
- NVD
- Modified, last modified June 17, 2026, 07:09 UTC
- Last checked
- CVE list November 19, 2026, 07:11 UTC; NVD November 19, 2026, 07:28 UTC; KEV December 3, 2026, 17:39 UTC; EPSS December 3, 2026
- Official record
- cve.org · NVD
Questions about CVE-2024-21513
Is CVE-2024-21513 exploited in the wild?
Not as far as CISA knows: it is not in the Known Exploited Vulnerabilities catalog, read December 3, 2026, 17:39 UTC. FIRST's EPSS gives it a 1.89% chance of exploitation activity in the next 30 days (scores of December 3, 2026).
Which versions of langchain-experimental are affected by CVE-2024-21513?
langchain-experimental before 0.0.21, per the GitHub advisory GHSA-cgcg-p68q-3w7v. The tables above give every range the sources list.
Which version fixes CVE-2024-21513?
0.0.21, per the GitHub advisory GHSA-cgcg-p68q-3w7v. Check the vendor's advisory before you rely on it.
How severe is CVE-2024-21513?
High (8.5, CVSS 3.1, from snyk). The severity table above shows each score with its source.
Where is the official record of CVE-2024-21513?
The CVE Program's record is at cve.org and the NVD's at nvd.nist.gov. For a fix, the vendor's own advisory is the one to follow.