Security Digest · Vulnerability record
CVE-2024-21513: langchain-experimental vulnerable to Arbitrary Code Execution
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.
CVSS 9.0 Critical EPSS 1.9% · p79
Should you act?
Critical, preconditions apply
Severe if exploited, but exploitation needs conditions that may not apply to you. This signal is computed from CISA KEV, EPSS and CVSS data; it is not an editorial verdict.
- No confirmed exploitation. It is not in CISA’s KEV catalog and CISA’s SSVC assessment records no known exploitation. That can change quickly after a public write-up; re-check if you are affected.
- EPSS 1.9%, percentile 79: FIRST’s model estimates a 1.9% chance of exploitation activity in the next 30 days, higher than 79% of all scored CVEs (moderate). EPSS is a probability, not a verdict.
- Needs an account (low (any account)). Exposure depends on who can log in.
- Only applies if your dependency tree includes
langchain-experimental(PyPI) >= 0, < 0.0.21, fixed in 0.0.21. Check your lockfile, including transitive dependencies.
What it is
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 GitHub advisory
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.
Weakness type: CWE-94.
Product: langchain-experimental (PyPI) · Assigned by: snyk · Published: 2024-07-15
Affected and fixed versions
| Ecosystem | Package | Vulnerable | First fixed |
|---|---|---|---|
| PyPI | langchain-experimental | >= 0, < 0.0.21 | 0.0.21 |
| Vendor | Product | Affected versions (per CVE record) |
|---|---|---|
| n/a | langchain-experimental | 0.0.15 < 0.0.21 |
Severity scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| snyk | 3.1 | 8.5 High | CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H/E:P |
| GitHub | 4.0 | 9.0 | CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H |
- Attack vector: network (remotely reachable)
- Attack complexity: low
- Attack requirements: present (depends on deployment conditions)
- Privileges required: low (any account)
- User interaction: none
CVSS measures how bad a flaw is if exploited, not how likely exploitation is. Read it next to the exploitation data below.
Exploitation and urgency
- CISA KEV: not listed (no confirmed in-the-wild exploitation known to CISA).
- CISA SSVC assessment: exploitation none, automatable no, technical impact total.
- FIRST EPSS (model of 2026-10-21): 1.89% probability of exploitation activity in the next 30 days; percentile 79.
Timeline
- — CVE record published by snyk
- — GitHub-reviewed advisory GHSA-cgcg-p68q-3w7v published (critical)
- — CVE record last updated
Sources and references
Original sources first. Version and fix details should always be confirmed against the vendor or project advisory.
Vulnerability records
- GitHub Advisory GHSA-cgcg-p68q-3w7v github.com
- CVE.org record CVE-2024-21513 cve.org
- NVD entry CVE-2024-21513 nvd.nist.gov
Other references from the CVE record and advisory
- security.snyk.io security.snyk.io
- github.com github.com
- github.com github.com
- github.com github.com
- github.com github.com