CVE-2023-39631
Langchain vulnerable to arbitrary code execution via the evaluate function in the numexpr library
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.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- High
- Integrity
- High
- Availability
- High
Exploit likelihood
What each source reports
NVD Score used
9.8
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.
- Record
CVE-2023-39631- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-94
- Updated
- 2026-11-02
CVE List No score
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.
- Record
CVE-2023-39631- Updated
- 2026-11-02
EUVDEUVD-2023-0117 No score
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.
- Record
EUVD-2023-0117- Updated
- 2026-11-03
GitHub AdvisoriesGHSA-f73w-4m7g-ch9x
9.8
Langchain vulnerable to arbitrary code execution via the evaluate function in the numexpr library
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.
- Record
GHSA-f73w-4m7g-ch9x- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-94
- Updated
- 2026-11-02
OSVGHSA-f73w-4m7g-ch9x
9.8
Langchain vulnerable to arbitrary code execution via the evaluate function in the numexpr library
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.
- Record
GHSA-f73w-4m7g-ch9x- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-94
- Updated
- 2026-11-02
OSVPYSEC-2023-162
9.8
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.
- Record
PYSEC-2023-162- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
OSVPYSEC-2023-163
9.8
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.
- Record
PYSEC-2023-163- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
OSV No score
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.
- Record
CVE-2023-39631- Updated
- 2026-11-02
OSVROOT-APP-PYPI-CVE-2023-39631 No score
CVE-2023-39631 in numexpr - Patched by Root
Root has patched CVE-2023-39631 in the numexpr package for Root:PyPI. Multiple fixed versions available.
- Record
ROOT-APP-PYPI-CVE-2023-39631- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
langchainPyPI |
before 0.0.308 | 0.0.308 |
numexprPyPI |
before 2.8.5 | 2.8.5 |
langchainPyPI |
before 0.0.308, plus listed versions 0.0.10.0.100.0.1000.0.1010.0.101rc0 Show 45 moreShow less0.0.1020.0.102rc00.0.1030.0.1040.0.1050.0.1060.0.1070.0.1080.0.1090.0.110.0.1100.0.1110.0.1120.0.1130.0.1140.0.1150.0.1160.0.1170.0.1180.0.1190.0.120.0.1200.0.1210.0.1220.0.1230.0.1240.0.1250.0.1260.0.1270.0.1280.0.1290.0.130.0.1300.0.1310.0.1320.0.1330.0.1340.0.1350.0.1360.0.1370.0.1380.0.1390.0.140.0.1400.0.141 |
0.0.308 |
numexprPyPI |
before 2.8.5, plus listed versions 1.1.11.21.31.3.11.4 Show 42 moreShow less1.4.11.4.22.02.0.12.12.22.2.12.2.22.32.3-rc12.3.12.42.4-rc12.4-rc22.4.12.4.22.4.32.4.42.4.52.4.62.52.5.12.5.22.6.02.6.12.6.22.6.32.6.42.6.52.6.62.6.6.dev02.6.72.6.82.6.92.7.02.7.12.7.22.7.32.8.02.8.12.8.32.8.4 |
2.8.5 |
langchainPyPI |
before 0.0.308, plus listed versions 0.0.10.0.100.0.1000.0.1010.0.101rc0 Show 45 moreShow less0.0.1020.0.102rc00.0.1030.0.1040.0.1050.0.1060.0.1070.0.1080.0.1090.0.110.0.1100.0.1110.0.1120.0.1130.0.1140.0.1150.0.1160.0.1170.0.1180.0.1190.0.120.0.1200.0.1210.0.1220.0.1230.0.1240.0.1250.0.1260.0.1270.0.1280.0.1290.0.130.0.1300.0.1310.0.1320.0.1330.0.1340.0.1350.0.1360.0.1370.0.1380.0.1390.0.140.0.1400.0.141 |
0.0.308 |
numexprRoot:PyPI |
before 2.8.4+aikido.2 | 2.8.4+aikido.22.8.4+aikido.32.8.4+aikido.4 |
History
| Recorded | Changed | Sources |
|---|---|---|
| aliases | EUVD | |
| first indexed | CVE List, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2023-39631 is a critical vulnerability (CVSS 9.8) in Langchain, published September 1, 2023. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 1.60%, the 75th percentile. Fixed in langchain 0.0.308.
References
github.com/langchain-ai/langchain/issues/8363
github.com/pydata/numexpr/issues/442
nvd.nist.gov/vuln/detail/CVE-2023-39631
github.com/pypa/advisory-database/tree/main/vulns/langchain/PYSEC-2023-162.yaml
github.com/pypa/advisory-database/tree/main/vulns/numexpr/PYSEC-2023-163.yaml
github.com/langchain-ai/langchain/pull/11302
Left out here: 518 versions. The JSON record has them.