CVE-2023-39659 json
LangChain vulnerable to arbitrary code execution
published 2023-08-15 3 y ago modified 2026-06-17 4 mo ago also GHSA-prgp-w7vf-ch62 , PYSEC-2023-147 , EUVD-2023-0115
- cvss
- 9.8
- version 3.1, NVD
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 1.5%
- EPSS 1.5% chance of exploitation in 30 days, percentile 74%
- public exploits
- 0
- none known
Summary
An issue in langchain langchain-ai v.0.0.232 and before allows a remote attacker to execute arbitrary code via a crafted script to the PythonAstREPLTool._run component.
Patch / fix
- pypi langchain 0.0.233, 0.0.325
- github.com/langchain-ai/langchain@cadfce2 commit
- github.com/langchain-ai/langchain#5640 pull request
- github.com/langchain-ai/langchain#12427 pull request
- github.com/langchain-ai/langchain/releases/tag/v0.0.325 release
CISA SSVC
- Exploitation
- Proof of concept is public
- Automatable
- yes
- Technical impact
- total
- Assessed
- 2 y ago
Exploit prediction
1.52% chance of exploitation in the next 30 days, higher than 74% of all scored CVEs (FIRST EPSS, 2026-11-08).
Exploits and checks
- github.com https://github.com/langchain-ai/langchain/issues/7700 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.325 <0.0.233 |
0.0.325 0.0.233 |
Classification
- Weakness
-
- CWE-74 Improper Neutralization of Special Elements in Output Used by a Downstream Component
References
-
github.com
/langchain-ai/langchain/pull/5640
web, issue-tracking, patch, report
-
github.com
/langchain-ai/langchain/pull/12427
web
-
github.com
/langchain-ai/langchain/commit/cadfce295f8a33828fc635c2e5ea28b883e5c992
web
-
github.com
/langchain-ai/langchain/issues/7700
web, exploit, issue-tracking, third-party-advisory, evidence, report
-
nvd.nist.gov
/vuln/detail/CVE-2023-39659
advisory
-
github.com
/langchain-ai/langchain
package
-
github.com
/langchain-ai/langchain/releases/tag/v0.0.325
web
-
github.com
/pypa/advisory-database/tree/main/vulns/langchain/PYSEC-2023-147.yaml
web
-
github.com
/advisories/GHSA-prgp-w7vf-ch62
advisory
Sources
- CVE List CVE-2023-39659
- GitHub Advisory GHSA-prgp-w7vf-ch62
- NVD CVE-2023-39659
- OSV PYSEC-2023-147
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.