Advisory Database
  • Advisories
  • Dependency Scanning
  1. pypi
  2. ›
  3. langchain-experimental
  4. ›
  5. CVE-2024-46946

CVE-2024-46946: LangChain Experimental Eval Injection vulnerability

September 19, 2024

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

References

  • docs.sympy.org/latest/modules/codegen.html
  • gist.github.com/12end/68c0c58d2564ef4141bccd4651480820
  • github.com/advisories/GHSA-p2qj-r53j-h3xj
  • github.com/langchain-ai/langchain
  • github.com/langchain-ai/langchain/releases/tag/langchain-experimental%3D%3D0.3.0
  • nvd.nist.gov/vuln/detail/CVE-2024-46946

Code Behaviors & Features

Detect and mitigate CVE-2024-46946 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions starting from 0.1.17 up to 0.3.0

Solution

Unfortunately, there is no solution available yet.

Impact 9.8 CRITICAL

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Learn more about CVSS

Weakness

  • CWE-95: Improper Neutralization of Directives in Dynamically Evaluated Code ('Eval Injection')

Source file

pypi/langchain-experimental/CVE-2024-46946.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:15:48 +0000.