CVE-2024-21513

HIGH

langchain-experimental 0.0.15-<0.0.21 - Remote Code Execution via VectorSQLDatabaseChain Eval

Title source: llm
STIX 2.1

Exploitation Summary

EIP tracks 2 public exploits for CVE-2024-21513. PoCs published by nskath, SavageSanta11.

AI-analyzed exploit summary This repository contains a functional proof-of-concept exploit for CVE-2024-21513, demonstrating how unvalidated SQL query results passed to Python's eval() in langchain-experimental can lead to remote code execution. The PoC includes a Flask app with SQLite integration to simulate the vulnerability.

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.

Exploits (2)

nomisec WORKING POC
by nskath · poc
https://github.com/nskath/CVE-2024-21513

This repository contains a functional proof-of-concept exploit for CVE-2024-21513, demonstrating how unvalidated SQL query results passed to Python's eval() in langchain-experimental can lead to remote code execution. The PoC includes a Flask app with SQLite integration to simulate the vulnerability.

Classification
Working Poc 95%
Attack Type
Rce
Complexity
Moderate
Reliability
Reliable
Target: langchain-experimental (specific version not specified)
No auth needed
Prerequisites: Docker and Docker Compose installed · Python environment with Flask and langchain-experimental
devstral-2 · analyzed Feb 18, 2026 Full analysis →
nomisec WORKING POC
by SavageSanta11 · poc
https://github.com/SavageSanta11/Reproduce-CVE-2024-21513

This repository contains a functional exploit PoC for CVE-2024-21513, demonstrating arbitrary code execution via the `VectorSQLDatabaseChain` component in `langchain-experimental` due to unsafe `eval()` usage. The PoC includes a Streamlit app that interacts with a PostgreSQL database and allows users to input malicious queries to trigger the vulnerability.

Classification
Working Poc 95%
Attack Type
Rce
Complexity
Moderate
Reliability
Reliable
Target: langchain-experimental (>=0.0.15 and <0.0.21)
Auth required
Prerequisites: Python 3.8+ · PostgreSQL database · OpenAI API key
devstral-2 · analyzed Feb 18, 2026 Full analysis →

Scores

CVSS v3 8.5
EPSS 0.1339
EPSS Percentile 94.4%
Attack Vector NETWORK
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H

CISA SSVC

Vulnrichment
Exploitation none
Automatable no
Technical Impact total

Details

CWE
CWE-94
Status published
Products (2)
langchain/langchain-experimental 0.0.15 - 0.0.21
pypi/langchain-experimental 0 - 0.0.21PyPI
Published Jul 15, 2024
Tracked Since Feb 18, 2026