CVE-2023-39631 json
Langchain vulnerable to arbitrary code execution via the evaluate function in the numexpr library
published 2023-09-01 3 y ago modified 2026-06-17 4 mo ago also GHSA-f73w-4m7g-ch9x , PYSEC-2023-162 , PYSEC-2023-163 , EUVD-2023-0117
- cvss
- 9.8
- version 3.1, NVD
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 1.6%
- EPSS 1.6% chance of exploitation in 30 days, percentile 75%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- pypi langchain 0.0.308
- pypi numexpr 2.8.5
CISA SSVC
- Exploitation
- Proof of concept is public
- Automatable
- yes
- Technical impact
- total
- Assessed
- 2 y ago
Exploit prediction
1.60% chance of exploitation in the next 30 days, higher than 75% of all scored CVEs (FIRST EPSS, 2026-11-08).
Exploits and checks
- github.com https://github.com/langchain-ai/langchain/issues/8363 referenced PoC, tagged "exploit" by a source, unverified
- github.com https://github.com/pydata/numexpr/issues/442 referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| NVD | 3.1 | 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| GitHub | 3.1 | 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| OSV | 3.1 | 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| pypi | langchain | <0.0.308 |
0.0.308 |
| pypi | numexpr | <2.8.5 |
2.8.5 |
Classification
- Weakness
-
- CWE-94 Improper Control of Generation of Code
References
-
github.com
/langchain-ai/langchain/issues/8363
web, exploit, issue-tracking, patch, third-party-advisory, report, evidence
-
github.com
/pydata/numexpr/issues/442
web, exploit, issue-tracking, patch, third-party-advisory, evidence, report
-
github.com
/langchain-ai/langchain/pull/11302
web, patch
-
github.com
/pydata/numexpr/commit/4b2d89cf14e75030d27629925b9998e1e91d23c7
web
-
nvd.nist.gov
/vuln/detail/CVE-2023-39631
advisory
-
github.com
/langchain-ai/langchain
package
-
github.com
/langchain-ai/langchain/releases/tag/v0.0.308
web
-
github.com
/pypa/advisory-database/tree/main/vulns/langchain/PYSEC-2023-162.yaml
web
-
github.com
/pypa/advisory-database/tree/main/vulns/numexpr/PYSEC-2023-163.yaml
web
-
github.com
/advisories/GHSA-f73w-4m7g-ch9x
advisory
Sources
- CVE List CVE-2023-39631
- GitHub Advisory GHSA-f73w-4m7g-ch9x
- NVD CVE-2023-39631
- OSV PYSEC-2023-162
- OSV PYSEC-2023-163
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.