---
id: CVE-2024-46946
aliases:
  - GHSA-p2qj-r53j-h3xj
  - PYSEC-2026-374
title: LangChain Experimental Eval Injection vulnerability
summary: LangChain Experimental Eval Injection vulnerability
severity: critical
cvss: 9.8
cvssVector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H'
vendor: langchain-experimental
product: langchain-experimental
ecosystem: pip
affected:
  - 'langchain-experimental >= 0.1.17, <= 0.3.0'
published: '2024-09-19'
updated: '2026-10-27'
sourceUpdated: '2026-10-27T17:00:03.986872162Z'
source: OSV
sourceUrl: 'https://osv.dev/vulnerability/GHSA-p2qj-r53j-h3xj'
references:
  - url: 'https://nvd.nist.gov/vuln/detail/CVE-2024-46946'
  - url: 'https://docs.sympy.org/latest/modules/codegen.html'
  - url: >-
      https://gist.github.com/12end/68c0c58d2564ef4141bccd4651480820#file-cve-2024-46946-txt
  - url: 'https://github.com/langchain-ai/langchain'
  - url: >-
      https://github.com/langchain-ai/langchain/releases/tag/langchain-experimental%3D%3D0.3.0
  - url: >-
      https://github.com/pypa/advisory-database/tree/main/vulns/langchain-experimental/PYSEC-2026-374.yaml
  - url: 'https://pypi.org/project/langchain-experimental'
  - url: 'https://github.com/advisories/GHSA-p2qj-r53j-h3xj'
tags:
  - osv
  - pip
  - ghsa
epss: 0.01387
epssPercentile: 0.72097
cwe:
  - CWE-95
ingestedAt: '2026-10-27T17:33:23.772Z'
---

## Overview

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

## Affected packages

- `langchain-experimental >= 0.1.17, <= 0.3.0`

## Remediation

Refer to the advisory for the patched release.
