LangChain Experimental Eval Injection vulnerability
CVE-2024-46946 · GHSA-p2qj-r53j-h3xj · PYSEC-2026-374 · published 19 Sept 2024
How serious is it
- Severity: critical, CVSS score 9.3 out of 10.
- No exploit prediction (EPSS) score yet.
- Not on the CISA list of exploited vulnerabilities.
- No public exploit in Exploit-DB.
Is your app affected by CVE-2024-46946?
Paste this prompt into Claude Code, Cursor or any AI coding tool: it runs a free Shippable scan of your project and fixes what it finds. Built with Lovable, Bolt or v0? Scan your live app. Or upload your package file.
Who is affected
langchain-experimental(PyPI) >= 0.1.17, <= 0.3.0
How to check
- Run
pip show langchain-experimentalin your project to see the installed version, including copies pulled in by other packages. - Or paste your lockfile into the checker: it lists every package with a known vulnerability, this one included.
- Or run
npx shippable-dev scan localhost:3000in your project folder. It reads your lockfile and flags this vulnerability along with every other known one.
How to fix
Copies a prompt for Claude Code, Cursor or Codex: it checks your lockfiles for this and upgrades it.
- No fixed version of
langchain-experimentalyet. Replace or remove it, or apply the workaround in the advisory below. - If a vulnerable version was live, check your logs and rotate the secrets that server could read.
The advisory
langchain_experimental (aka LangChain Experimental) 0.1.17 through 0.3.0 for LangChain allows attackers to execute arbitrary code through sympy.sympify (which uses eval) in LLMSymbolicMathChain. LLMSymbolicMathChain was introduced in fcccde406dd9e9b05fc9babcbeb9ff527b0ec0c6 (2023-10-05).
Check your whole app
Dependencies are only half of it. Free and read-only: before you push, run npx shippable-dev scan localhost:3000 in your project folder, no account needed. For your live app, you prove it's yours with a one-line tag first.
References
- nvd.nist.gov/vuln/detail/CVE-2024-46946
- docs.sympy.org/latest/modules/codegen.html
- gist.github.com/12end/68c0c58d2564ef4141bccd4651480820#file-cve-2024-46946-txt
- github.com/langchain-ai/langchain/releases/tag/langchain-experimental%3D%3D0.3.0
- github.com/pypa/advisory-database/tree/main/vulns/langchain-experimental/PYSEC-2026-374.yaml
- pypi.org/project/langchain-experimental
- github.com/advisories/GHSA-p2qj-r53j-h3xj
- github.com/langchain-ai/langchain
Merged from GitHub Advisory Database, OSV. Last updated 28 Oct 2026. All vulnerabilities · RSS · JSON