{"id":"CVE-2023-36095","aliases":["CVE-2023-36095","GHSA-gwqq-6vq7-5j86","PYSEC-2023-138"],"related":[],"kind":"vulnerability","state":"published","title":"langchain Code Injection vulnerability","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"An issue in Harrison Chase langchain allows an attacker to execute arbitrary code via the PALChain,from_math_prompt(llm).run in the python exec method.","format":"markdown","source":"ghsa"}],"published":"2023-08-05T00:00:00.000Z","modified":"2026-07-09T01:18:28.060Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},"severities":[{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"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","rating":"CRITICAL"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"}],"cwes":["CWE-94"],"affected":[{"ranges":[{"version":"n/a","status":"affected"}],"source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"0.0.236"}],"ecosystem":"PyPI","package":"langchain","purl":"pkg:pypi/langchain","source":"ghsa"},{"ranges":[{"status":"affected","version":"0.0.194"}],"vendor":"langchain","product":"langchain","cpe":"cpe:2.3:a:langchain:langchain:0.0.194:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"0.0.236"}],"ecosystem":"PyPI","package":"langchain","purl":"pkg:pypi/langchain","source":"pysec"}],"references":[{"url":"https://github.com/hwchase17/langchain","tags":["product","web","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/langchain-ai/langchain/issues/5872","tags":["advisory","evidence","exploit","issue-tracking","report","vendor-advisory","web","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2023-36095","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/langchain-ai/langchain/pull/6003","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/langchain-ai/langchain/pull/7870","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/langchain-ai/langchain/commit/8ba9835b925473655914f63822775679e03ea137","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/langchain-ai/langchain/commit/e294ba475a355feb95003ed8f1a2b99942509a9e","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/langchain-ai/langchain","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/langchain-ai/langchain/commits/v0.0.236?after=4d8b48bdb3f17c764c5c2e3c7140071603869e74+34&branch=v0.0.236&qualified_name=refs%2Ftags%2Fv0.0.236","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/langchain/PYSEC-2023-138.yaml","tags":["web"],"sources":["ghsa"]},{"url":"http://langchain.com","tags":["web"],"sources":["ghsa","pysec"]},{"url":"https://github.com/advisories/GHSA-gwqq-6vq7-5j86","tags":["advisory"],"sources":["pysec"]}],"credits":[],"assigner":"mitre","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"yes","technicalImpact":"total","date":"2024-10-17T14:46:57.535Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2023-36095","url":"https://www.cve.org/CVERecord?id=CVE-2023-36095","licence":"CVE Terms of Use","modified":"2026-07-09T00:26:31.756Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-gwqq-6vq7-5j86","url":"https://github.com/advisories/GHSA-gwqq-6vq7-5j86","licence":"CC-BY-4.0","modified":"2024-09-27T18:01:36.035Z"},{"source":"nvd","name":"NVD","id":"CVE-2023-36095","url":"https://nvd.nist.gov/vuln/detail/CVE-2023-36095","licence":"Public domain","modified":"2026-07-09T01:18:28.060Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2023-138","url":"https://osv.dev/vulnerability/PYSEC-2023-138","licence":"CC-BY-4.0","modified":"2026-06-10T17:01:59.374Z"}],"updatedAt":"2026-11-25T22:58:26.775Z","epss":{"score":0.0117,"percentile":0.68315,"date":"2026-12-01T12:00:22.000Z"}}