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

Advisory record · `GHSA-cgcg-p68q-3w7v`

- **Identifiers:** `GHSA-cgcg-p68q-3w7v` · `CVE-2024-21513` · `PYSEC-2024-62`
- **State:** Confirmed
- **Severity:** CVSS 8.5 High
- **Critical:** No
- **Weakness (CWE):** [CWE-94](https://cwe.mitre.org/data/definitions/94.html)
- **Tags:** [Code injection](https://agentprime.io/advisories/tag/code-injection.md)
- **Published:** 15 Jul 2024
- **Updated:** 10 Jun 2026
- **Reviewed by a person:** No

Published by the GitHub Advisory Database at 15 Jul 2024, 05:15 UTC. agentprime has not analysed this yet, so whether it affects any app is not known.

## Affected packages

- `langchain-experimental` (PyPI): affected `<7b13292e3544b2f5f2bfb8a27a062ea2b0c34561 || <0.0.21`; fixed in `7b13292e3544b2f5f2bfb8a27a062ea2b0c34561`, `0.0.21`

## Machine-written summary

Summary written by Claude Haiku from the source advisory. Not reviewed by a person.

> langchain-experimental versions from 0.0.15 before 0.0.21 are vulnerable to arbitrary code execution when values retrieved from the database are passed to eval. An attacker who can control the input prompt on a server configured with VectorSQLDatabaseChain can execute arbitrary Python code. Upgrade to langchain-experimental 0.0.21 or later.

Written 10 Nov 2026.

## Not analysed yet

We haven’t published our analysis of this Advisory yet. Once a person has reviewed it, this page will say what’s vulnerable, what has to be true for your app to be affected, and how to check.

## Severity and exploitation

- 8.5 High, CVSS 3.1: `CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H/E:P`, from CNA (snyk)

- **CISA KEV:** Not listed.
- **EPSS:** 0.019, the 79th percentile, on 16 Nov 2026: FIRST’s estimate of the chance of exploitation in the next 30 days.

## Timeline

This record came from the full history of the GitHub Advisory Database, published 15 Jul 2024. New records show when each source confirmed them.

## Sources

- [GitHub Advisory Database: GHSA-cgcg-p68q-3w7v](https://github.com/advisories/GHSA-cgcg-p68q-3w7v)
- [OSV: GHSA-cgcg-p68q-3w7v](https://osv.dev/vulnerability/GHSA-cgcg-p68q-3w7v)
- <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>
- <https://github.com/advisories/GHSA-cgcg-p68q-3w7v>

Facts on this page come from the GitHub Advisory Database (CC-BY 4.0), OSV and the other sources listed, as published. We don’t reproduce full advisory descriptions, which can contain exploit code.

## Check whether this affects you

A Match means an installed version is in the affected range above. Most don’t affect the app; agentprime hasn’t analysed this one yet.

- With the agentprime MCP server (<https://api.agentprime.io/mcp>), ask your agent to check the project: `check_lockfile` sends a lockfile, `check_packages` a list of installed packages, and both return the Matches and the upgrades that clear them. `get_advisory` returns this record. Setup: <https://agentprime.io/mcp.md>
- In a browser: <https://agentprime.io/check/> reads your lockfile in the browser, never uploading it.
- Whether it touches your code, with file and line: the Claude Code plugin, <https://agentprime.io/plugin.md>
- As JSON: <https://api.agentprime.io/v1/advisories/GHSA-cgcg-p68q-3w7v>, or `POST https://api.agentprime.io/v1/match` with your packages (<https://agentprime.io/api.md>)

---

The web page: <https://agentprime.io/advisories/GHSA-cgcg-p68q-3w7v/>. Everything for agents: <https://agentprime.io/llms.txt>.
