# CVE-2023-38860: LangChain vulnerable to arbitrary code execution

- Severity: Critical 9.8 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.41%, higher than 73% of CVEs (2026-12-01)
- Public exploit code or proof of concept: 2 links below, marked "exploit"
- Published: 2023-08-15T00:00:00.000Z
- Modified: 2026-06-17T06:11:12.740Z
- Also known as: GHSA-fj32-q626-pjjc, PYSEC-2023-145
- Weaknesses: CWE-94
- SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact total
- Assigned by: mitre

## Description

An issue in LangChain v.0.0.231 allows a remote attacker to execute arbitrary code via the prompt parameter.

(As written by CVE List.)

## Affected

- Unspecified product: n/a
- langchain (PyPI): before 0.0.247
- langchain langchain: 0.0.231

## Every score

- GitHub: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- GitHub: CVSS:4.0 Critical `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: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- PyPA Advisory Database: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`

## References

- <https://github.com/hwchase17/langchain/issues/7641> (exploit, issue-tracking, web)
- <https://github.com/langchain-ai/langchain/issues/7641> (exploit, evidence, report, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2023-38860> (advisory)
- <https://github.com/langchain-ai/langchain/pull/8092> (web)
- <https://github.com/langchain-ai/langchain/pull/8425> (web)
- <https://github.com/langchain-ai/langchain/commit/d353d668e4b0514122a443cef91de7f76fea4245> (web)
- <https://github.com/langchain-ai/langchain/commit/fab24457bcf8ede882abd11419769c92bc4e7751> (web)
- <https://github.com/hwchase17/langchain> (package)
- <https://github.com/pypa/advisory-database/tree/main/vulns/langchain/PYSEC-2023-145.yaml> (web)
- <https://github.com/advisories/GHSA-fj32-q626-pjjc> (advisory)

## Sources

- CVE List: [CVE-2023-38860](https://www.cve.org/CVERecord?id=CVE-2023-38860), CVE Terms of Use, modified 2024-10-09
- GitHub Advisory Database: [GHSA-fj32-q626-pjjc](https://github.com/advisories/GHSA-fj32-q626-pjjc), CC-BY-4.0, modified 2024-09-27
- NVD: [CVE-2023-38860](https://nvd.nist.gov/vuln/detail/CVE-2023-38860), Public domain, modified 2026-06-17
- PyPA Advisory Database: [PYSEC-2023-145](https://osv.dev/vulnerability/PYSEC-2023-145), CC-BY-4.0, modified 2026-06-10

---

Page: https://cve.day/CVE-2023-38860 · Whole record: https://cve.day/CVE-2023-38860.json · Rebuilt by cve.day 2026-11-25T22:58:27.138Z
