CVE-2024-21513
JSON

8.5high

langchain-experimental vulnerable to Arbitrary Code Execution

Severity
8.5high CVSS:3.1 by snyk
Exploit likelihood
1.89% (higher than 80% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
snyk
Also known as
GHSA-cgcg-p68q-3w7vPYSEC-2024-62

Description

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.

Affected

Product or packageVersionsReported by
langchain-experimentalfrom 0.0.15 before 0.0.21CVE List
langchain langchain_experimentalfrom 0.0.15 before 0.0.21CVE List
langchain-experimental (PyPI)before 0.0.21, before 7b13292e3544b2f5f2bfb8a27a062ea2b0c34561GitHub Advisory Database, PyPA Advisory Database
langchain langchain-experimentalfrom 0.0.15 before 0.0.21NVD

All scores

snyk8.5high CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H/E:P
GitHub8.5critical CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H
GitHubcritical CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H
NVD8.5high CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H

Classification

CWE-94

SSVC (CISA-ADP): exploitation none, automatable no, technical impact total.

What each source says

CVE List

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.

NVD (es)

Las versiones del paquete langchain-experimental desde 0.0.15 y anteriores a 0.0.21 son vulnerables a la ejecución de código arbitrario cuando se recuperan valores de la base de datos; el código intentará llamar a 'eval' en todos los valores. Un atacante puede aprovechar esta vulnerabilidad y ejecutar código Python arbitrario si puede controlar el mensaje de entrada y el servidor está configurado con VectorSQLDatabaseChain. **Notas:** Impacto en la confidencialidad, integridad y disponibilidad del componente vulnerable: Confidencialidad: la ejecución del código ocurre dentro del componente afectado, en este caso langchain-experimental, por lo que todos los recursos son necesariamente accesibles. Integridad: No hay nada protegido inherentemente por el componente afectado. Aunque cualquier cosa devuelta por el componente cuenta como "información" cuya confiabilidad puede verse comprometida. Disponibilidad: la pérdida de disponibilidad no es causada por el ataque en sí, sino que ocurre como resultado durante los pasos posteriores a la explotación del atacante. Impacto en la confidencialidad, integridad y disponibilidad del sistema posterior: como usuario legítimo con pocos privilegios del paquete (PR:L), el atacante no tiene más acceso a los datos propiedad del paquete como resultado de esta vulnerabilidad que antes. con uso normal (por ejemplo, puede consultar la base de datos). La acción no intencionada que se puede realizar al salir del entorno de la aplicación y filtrar archivos, realizar conexiones remotas, etc., ocurre durante la fase posterior a la explotación en el sistema posterior, en este caso, el sistema operativo. AT:P: Un atacante debe poder influir en el mensaje de entrada, mientras el servidor está configurado con el complemento VectorSQLDatabaseChain.

References

Sources

SourceRecordLicence
CVE ListCVE-2024-21513 changed 2024-08-01CVE Terms of Use
GitHub Advisory DatabaseGHSA-cgcg-p68q-3w7v changed 2024-11-22CC-BY-4.0
NVDCVE-2024-21513 changed 2026-06-17Public domain
PyPA Advisory DatabasePYSEC-2024-62 changed 2026-06-10CC-BY-4.0