CVE-2023-39631Langchain
Critical 9.8 No auth needed
Follow: this CVE · Langchain · Langchain We alert you by email or Slack (account required).
- Priority
- 74
- CVSS 3.1
- 9.8
- EPSS
- 1.7% probability of exploitation in 30 days · percentile 78
- Auth required
- No
- Published
- Sep 1, 2023
- Updated
- Jun 17, 2026
- Category
- Application · Cross-platform
- Weakness (CWE)
- CWE-94
- SSVC (CISA)
- Exploitation: proof of concept · Automatable: yes · Technical impact: total
- Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
What happens
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.
What to do
- Apply the vendor's security update for Langchain.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| PyPI | langchain |
< 0.0.308 |
0.0.308 |
pip install "langchain>=0.0.308" |
| PyPI | langchain |
< 0.0.308 |
0.0.308 |
pip install "langchain>=0.0.308" |
| PyPI | numexpr |
< 2.8.5 |
2.8.5 |
pip install "numexpr>=2.8.5" |
| PyPI | numexpr |
< 2.8.5 |
2.8.5 |
pip install "numexpr>=2.8.5" |
Per OSV / GitHub Advisories (GHSA-f73w-4m7g-ch9x, PYSEC-2023-162, PYSEC-2023-163). Check the version in your lockfile before upgrading.
Affected products (CPE)
| Vendor | Product | Versions |
|---|---|---|
| langchain | langchain | 0.0.245 |
Official sources
References
Links published by the sources. Open them with care.
- github.com Exploit Issue Tracking Patch
- github.com Exploit Issue Tracking Patch