# CVE-2024-46946: LangChain Experimental Eval Injection vulnerability

Source: https://junglewise.ai/threats/cve-2024-46946-langchain-experimental-eval-injection-vulnerability  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2024-09-19  
License: CC BY 4.0 with a link back

CVE-2024-46946 · Severity: critical · CVSS 9.8 · Published 2024-09-19

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

Technologies: [langchain-experimental (PyPI)](https://junglewise.ai/threats/technologies/langchain-experimental). Vendors: [PyPI](https://junglewise.ai/threats/vendors/pypi).

## Quick answers

**Is CVE-2024-46946 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2024-46946 being exploited in the wild.

**How severe is CVE-2024-46946?** Critical severity, with a CVSS score of 9.8, published 19 September 2024.

**Which products and versions are affected?** langchain-experimental (PyPI) >= 0.1.17, <= 0.3.0, ECOSYSTEM:introduced=0.1.17,last_affected=0.3.0.

**Is there a fix for CVE-2024-46946?** No fixed version is recorded yet. Check the vendor's advisory in the references below. If you run it, Junglewise drafts a mitigation that fits your setup and applies it once you approve, with senior security engineers behind it.

**Am I affected by CVE-2024-46946?** Check whether you run langchain-experimental (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## Affected products

- langchain-experimental (PyPI) >= 0.1.17, <= 0.3.0, ECOSYSTEM:introduced=0.1.17,last_affected=0.3.0

## Identifiers

- CVE-2024-46946
- GHSA-p2qj-r53j-h3xj
- PYSEC-2026-374

## Related threats

- [langchain-experimental vulnerable to Arbitrary Code Execution](https://junglewise.ai/threats/cve-2024-21513-langchain-experimental-vulnerable-to-arbitrary-code-execution)
- [langchain_experimental Code Execution via Python REPL access](https://junglewise.ai/threats/cve-2024-38459-langchain-experimental-code-execution-via-python-repl-access)
- [LangChain Experimental vulnerable to arbitrary code execution](https://junglewise.ai/threats/cve-2024-27444-langchain-experimental-vulnerable-to-arbitrary-code-execution)
- [langchain_experimental vulnerable to arbitrary code execution via PALChain in the python exec method](https://junglewise.ai/threats/cve-2023-44467-langchain-experimental-vulnerable-to-arbitrary-code-execution-via)
