Free AI Safety Workshop — in collaboration with explainx.aiSave your seat
AgentbeamBeta
AI agent vulnerability · LangChain

CVE-2023-39631: Langchain vulnerable to arbitrary code execution via the evaluate function in the numexpr library

criticalCVSS 3.1 9.8GHSA-f73w-4m7g-ch9x

An issue in LanChain-ai Langchain v.0.0.245 allows a remote attacker to execute arbitrary code via the evaluate function in the numexpr library. Patches: Released in v.0.0.308. numexpr dependency is optional for langchain.

Published Sep 1, 2023 · Updated Feb 20, 2025

Affected packages

langchain

Ecosystem
PyPI
Affected
< 0.0.308
Fixed in
0.0.308
Check
pip show langchain

numexpr

Ecosystem
PyPI
Affected
< 2.8.5
Fixed in
2.8.5
Check
pip show numexpr

Advisory details

From the GitHub Advisory Database (CC BY 4.0).

An issue in LanChain-ai Langchain v.0.0.245 allows a remote attacker to execute arbitrary code via the evaluate function in the numexpr library.

Patches: Released in v.0.0.308. numexpr dependency is optional for langchain.

Credited to eyurtsev.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology

More LangChain vulnerabilities

All LangChain entries