CVE-2024-46946: LangChain Experimental Eval Injection vulnerability

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

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.