CVE-2023-36281: langchain Improper Control of Generation of Code
Vulnerability summary
CVE-2023-36281 is a critical (CVSS 9.8) Improper Control of Generation of Code vulnerability in langchain. EPSS estimates a 3.41% chance of exploitation in the next 30 days, higher than 89.2% of scored vulnerabilities. 2 public exploits are recorded.
Public exploit (GitHub, Date unknown)
Source freshness unavailable
How is this decided?Timeline
- 22-08-2023PublishedVulnerability first disclosed.
- 15-10-2024Last modifiedVulnerability information updated.
Description
An issue in langchain v.0.0.171 allows a remote attacker to execute arbitrary code via a JSON file to load_prompt. This is related to __subclasses__ or a template.
CVSS metrics
3 scores · 3 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
- NVDNIST9.8CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS trend
Probability
3.41%
Chance of exploitation in the next 30 days
Percentile
89%
Versus all other CVEs
30-day change
Decrease -0.03 pp
From 3.44% 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
Exploit Reference (aisec.today)
Maturity: unknown
Weaknesses
CWE · root causeAffected systems
Known conditions: network-reachable, no authentication, no user interaction (CVSS vector). Other conditions: not stated in public data.
Langchain1 product
- langchain0.0.171
PyPI1 product
- langchain< 0.0.312 | < 0.0.171
2 vendors · 2 products
References
9 links- github.com/hwchase17/langchain/issues/4394WEBEVIDENCEREPORTAdvisoryExploitIssue TrackingVendor Advisory