INCIDENT MAP

Browse / Improper Output Handling / CVE-2023-39631

Langchain vulnerable to arbitrary code execution via the evaluate function in the numexpr library

CVE-2023-39631 ยท 2023-09-01 critical

Class
Improper Output Handling (filed by a model that read the advisory)
Technique
Code and command execution
Affected
langchain (PyPI)
CVSS
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS
1.6% chance of exploitation in 30 days

How it works, in short

Attacker-influenced text reaching numexpr's evaluate function in LangChain runs arbitrary code, because the library passes that text to an unsafe evaluator. (Our summary, written by a model. The source text is below.)

Details

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.

References

Source: GitHub Advisory Database, used under CC BY 4.0.