# CVE-2023-36095: langchain Code Injection vulnerability

- 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.17%, higher than 68% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2023-08-05T00:00:00.000Z
- Modified: 2026-07-09T01:18:28.060Z
- Also known as: GHSA-gwqq-6vq7-5j86, PYSEC-2023-138
- Weaknesses: CWE-94
- SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact total
- Assigned by: mitre

## Description

An issue in Harrison Chase langchain v.0.0.194 allows an attacker to execute arbitrary code via the python exec calls in the PALChain, affected functions include from_math_prompt and from_colored_object_prompt.

(As written by CVE List.)

## Affected

- Unspecified product: n/a
- langchain (PyPI): before 0.0.236
- langchain langchain: 0.0.194

## 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/langchain-ai/langchain/issues/5872> (exploit, advisory, evidence, issue-tracking, report, vendor-advisory, web)
- <https://github.com/hwchase17/langchain> (product, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2023-36095> (advisory)
- <https://github.com/langchain-ai/langchain/pull/6003> (web)
- <https://github.com/langchain-ai/langchain/pull/7870> (web)
- <https://github.com/langchain-ai/langchain/commit/8ba9835b925473655914f63822775679e03ea137> (web)
- <https://github.com/langchain-ai/langchain/commit/e294ba475a355feb95003ed8f1a2b99942509a9e> (web)
- <https://github.com/langchain-ai/langchain> (package)
- <https://github.com/langchain-ai/langchain/commits/v0.0.236?after=4d8b48bdb3f17c764c5c2e3c7140071603869e74+34&branch=v0.0.236&qualified_name=refs%2Ftags%2Fv0.0.236> (web)
- <https://github.com/pypa/advisory-database/tree/main/vulns/langchain/PYSEC-2023-138.yaml> (web)
- <http://langchain.com> (web)
- <https://github.com/advisories/GHSA-gwqq-6vq7-5j86> (advisory)

## Sources

- CVE List: [CVE-2023-36095](https://www.cve.org/CVERecord?id=CVE-2023-36095), CVE Terms of Use, modified 2026-07-09
- GitHub Advisory Database: [GHSA-gwqq-6vq7-5j86](https://github.com/advisories/GHSA-gwqq-6vq7-5j86), CC-BY-4.0, modified 2024-09-27
- NVD: [CVE-2023-36095](https://nvd.nist.gov/vuln/detail/CVE-2023-36095), Public domain, modified 2026-07-09
- PyPA Advisory Database: [PYSEC-2023-138](https://osv.dev/vulnerability/PYSEC-2023-138), CC-BY-4.0, modified 2026-06-10

---

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