CVE-2023-39659
CRITICAL 9.8CVSS 3.1LangChain vulnerable to arbitrary code execution
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.
- Published
- 15 Aug 2023
- Last modified
- 17 Jun 2026
- Assigned by
- cve@mitre.org
- NVD status
- Modified
- Weakness
- CWE-74
- Also known as
- GHSA-prgp-w7vf-ch62PYSEC-2023-147
- Sources
- NVDJSONOSV GHSA-prgp-w7vf-ch62JSONOSV PYSEC-2023-147JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| OSV | GitHub | CVSS 4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N | |
| 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.232 | |
| OSV | PyPI | langchain | < 0.0.325 | 0.0.325 |
| OSV | PyPI | langchain | < 0.0.233 | 0.0.233 |
References
- https://github.com/langchain-ai/langchain/issues/7700 · Exploit, Issue Tracking, Third Party Advisory, WEB, EVIDENCE, REPORT
- https://github.com/langchain-ai/langchain/pull/5640 · Issue Tracking, Patch, WEB, REPORT, FIX
- https://nvd.nist.gov/vuln/detail/CVE-2023-39659 · ADVISORY
- https://github.com/langchain-ai/langchain/pull/12427 · WEB
- https://github.com/langchain-ai/langchain/commit/cadfce295f8a33828fc635c2e5ea28b883e5c992 · WEB
- https://github.com/langchain-ai/langchain · PACKAGE
- https://github.com/langchain-ai/langchain/releases/tag/v0.0.325 · WEB
- https://github.com/pypa/advisory-database/tree/main/vulns/langchain/PYSEC-2023-147.yaml · WEB
- https://github.com/advisories/GHSA-prgp-w7vf-ch62 · ADVISORY
History
- 25 Nov 2026 20:36 UTC · NVD: first stored (published 15 Aug 2023)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 15 Aug 2023)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 15 Aug 2023)