CVE-2023-39631: langchain Improper Control of Generation of Code
Vulnerability summary
CVE-2023-39631 is a critical (CVSS 9.8) Improper Control of Generation of Code vulnerability in langchain. EPSS estimates a 1.60% chance of exploitation in the next 30 days, higher than 76.6% of scored vulnerabilities. 2 public exploits are recorded.
Public exploit (GitHub, Date unknown)
Source freshness unavailable
How is this decided?Timeline
- 01-09-2023PublishedVulnerability first disclosed.
- 01-10-2024Last modifiedVulnerability information updated.
Description
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.
CVSS metrics
2 scores · 2 sources · 1 version- OSV · PypiEcosystem advisory · calculated9.8CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS trend
Probability
1.60%
Chance of exploitation in the next 30 days
Percentile
77%
Versus all other CVEs
30-day change
No change 0.00 pp
From 1.60% on 04-11-2026
Known exploited
Compare KEV catalogsNot in the CISA KEV catalog.
Not in the ENISA CNW catalog.
Not in the CIRCL catalog.
Public exploits
2 foundLangchain
Maturity: poc
Numexpr
Maturity: poc
Weaknesses
CWE · root causeAffected systems
Known conditions: network-reachable, no authentication, no user interaction (CVSS vector). Other conditions: not stated in public data.
PyPI2 products
- langchain< 0.0.308
- numexpr< 2.8.5
Langchain1 product
- langchain0.0.245
2 vendors · 3 products
References
10 links- github.com/langchain-ai/langchain/issues/8363WEBREPORTEVIDENCEFIXExploitIssue TrackingPatchThird Party Advisory
- github.com/pydata/numexpr/issues/442WEBFIXEVIDENCEREPORTExploitIssue TrackingPatchThird Party Advisory