CVE-2023-39631
CRITICAL 9.8CVSS 3.1Langchain 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.
- Published
- 1 Sep 2023
- Last modified
- 17 Jun 2026
- Assigned by
- cve@mitre.org
- NVD status
- Modified
- Weakness
- CWE-94
- Also known as
- GHSA-f73w-4m7g-ch9xPYSEC-2023-162PYSEC-2023-163
- Sources
- NVDJSONOSV GHSA-f73w-4m7g-ch9xJSONOSV PYSEC-2023-162JSONOSV PYSEC-2023-163JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | CRITICAL 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| OSV | GitHub | CVSS 3.1 | CRITICAL 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| OSV | PyPA | CVSS 3.1 | CRITICAL 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | langchain | langchaincpe:2.3:a:langchain:langchain:0.0.245:*:*:*:*:*:*:* |
= 0.0.245 | |
| OSV | PyPI | langchain | < 0.0.308 | 0.0.308 |
| OSV | PyPI | numexpr | < 2.8.5 | 2.8.5 |
References
- https://github.com/langchain-ai/langchain/issues/8363 · Exploit, Issue Tracking, Patch, Third Party Advisory, WEB, REPORT, EVIDENCE, FIX
- https://github.com/pydata/numexpr/issues/442 · Exploit, Issue Tracking, Patch, Third Party Advisory, WEB, FIX, EVIDENCE, REPORT
- https://nvd.nist.gov/vuln/detail/CVE-2023-39631 · ADVISORY
- https://github.com/langchain-ai/langchain/pull/11302 · WEB, FIX
- https://github.com/pydata/numexpr/commit/4b2d89cf14e75030d27629925b9998e1e91d23c7 · WEB
- https://github.com/langchain-ai/langchain · PACKAGE
- https://github.com/langchain-ai/langchain/releases/tag/v0.0.308 · WEB
- https://github.com/pypa/advisory-database/tree/main/vulns/langchain/PYSEC-2023-162.yaml · WEB
- https://github.com/pypa/advisory-database/tree/main/vulns/numexpr/PYSEC-2023-163.yaml · WEB
- https://github.com/advisories/GHSA-f73w-4m7g-ch9x · ADVISORY
History
- 25 Nov 2026 20:36 UTC · NVD: first stored (published 1 Sep 2023)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 1 Sep 2023)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 1 Sep 2023)
- 25 Nov 2026 20:11 UTC · OSV: first stored (published 1 Sep 2023)