CVE-2024-46946

CRITICAL
Published Sep 19, 2024 Modified Jul 16, 2025 CWE-20

Description

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

Is your site exposed to CVE-2024-46946?

Run a free security scan — no signup, results in seconds.

CVSS v3.1 Score

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

Weakness Type (CWE)

CWE-20 Improper Input Validation

Affected Products

Vendor Product
langchain langchain-experimental

References

Frequently Asked Questions

What is CVE-2024-46946? +
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). It has a CVSS v3.1 base score of 9.8 (CRITICAL).
How severe is CVE-2024-46946? +
CVE-2024-46946 has a CVSS v3.1 score of 9.8 out of 10, rated CRITICAL. This is a critical vulnerability that should be patched immediately.
What products are affected by CVE-2024-46946? +
CVE-2024-46946 affects products from langchain, specifically: langchain-experimental. Check the affected products table above for specific version ranges.
How do I check if I'm vulnerable to CVE-2024-46946? +
You can use Secably's free Website Scanner to check your website for known vulnerabilities. For infrastructure scanning, use the Port Scanner to identify exposed services that may be affected. Check the vendor advisories linked above for specific patch and version information.

Related Vulnerabilities

Don't wait for an exploit

Scan your website for vulnerabilities like CVE-2024-46946 — free, no signup required.