{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2023-36095","id":"CVE-2023-36095","title":"langchain Code Injection vulnerability","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.","descriptionLong":"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.","published":"2023-08-05T00:00:00.000Z","updated":"2026-10-28T02:30:56.141176213Z","reserved":"2023-06-21T00:00:00.000Z","status":"Modified","rejected":false,"assigner":"mitre","metric":{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","rating":"critical","source":"NVD"},"metrics":[{"version":"4.0","score":null,"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","source":"GitHub"},{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","rating":"critical","source":"NVD"},{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","rating":"critical","source":"GitHub"},{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","rating":"critical","source":"OSV"}],"rating":"critical","products":[],"affectedProducts":[{"vendor":"n/a","product":"n/a","defaultStatus":null,"versions":[{"version":"n/a","status":"affected"}],"platforms":[]}],"packages":[{"ecosystem":"PyPI","name":"langchain","purl":"pkg:pypi/langchain","ranges":["<0.0.236"],"fixed":["0.0.236"],"advisory":"GHSA-gwqq-6vq7-5j86"}],"cwes":["CWE-94"],"aliases":["GHSA-gwqq-6vq7-5j86","PYSEC-2023-138"],"references":[{"url":"https://github.com/hwchase17/langchain","tags":["x_transferred","Product","package","web"]},{"url":"https://github.com/langchain-ai/langchain/issues/5872","tags":["x_transferred","Exploit","Issue Tracking","Vendor Advisory","report","web","evidence","advisory"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/36xxx/CVE-2023-36095.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2023-36095","tags":["advisory"]},{"url":"https://github.com/langchain-ai/langchain/pull/6003","tags":["web"]},{"url":"https://github.com/langchain-ai/langchain/pull/7870","tags":["web"]},{"url":"https://github.com/langchain-ai/langchain/commit/8ba9835b925473655914f63822775679e03ea137","tags":["web"]},{"url":"https://github.com/langchain-ai/langchain/commit/e294ba475a355feb95003ed8f1a2b99942509a9e","tags":["web"]},{"url":"https://github.com/langchain-ai/langchain","tags":["package"]},{"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"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/langchain/PYSEC-2023-138.yaml","tags":["web"]},{"url":"http://langchain.com","tags":["web"]},{"url":"https://github.com/advisories/GHSA-gwqq-6vq7-5j86","tags":["advisory"]}],"patchReferenced":false,"fixAvailable":true,"exploitReferenced":true,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"poc","automatable":"yes","technicalImpact":"total"},"epss":0.0117,"epssPercentile":0.68046,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2023-36095","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2023-36095","ok":true,"note":"Modified"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2023-36095","ok":true,"note":"1 package"},{"name":"GitHub Advisory","url":"https://github.com/advisories/GHSA-gwqq-6vq7-5j86","ok":true,"note":"GHSA-gwqq-6vq7-5j86"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2023-36095","ok":true,"note":"scored 2026-11-18"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}