{"id":"CVE-2023-29374","published":"2023-04-05T00:00:00Z","modified":"2025-02-12T16:24:39Z","title":"In LangChain through 0.0.131, the LLMMathChain chain allows prompt injection attacks that can execute arbitrary code…","vendor":null,"product":null,"tier":"tail","description":{"text":"In LangChain through 0.0.131, the LLMMathChain chain allows prompt injection attacks that can execute arbitrary code via the Python exec method.","provenance":"source","from":"CVE.org"},"cvss":{"score":9.8,"severity":"CRITICAL","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","provenance":"source","from":"CISA ADP Vulnrichment"},"epss":{"score":0.39653,"percentile":0.98652,"provenance":"source"},"cwes":[{"id":"CWE-74","name":"Improper Neutralization of Special Elements in Output Used by a Downstream Component"}],"references":[{"url":"https://github.com/hwchase17/langchain/pull/1119","tags":[]},{"url":"https://github.com/hwchase17/langchain/issues/814","tags":[]},{"url":"https://twitter.com/rharang/status/1641899743608463365/photo/1","tags":[]},{"url":"https://github.com/hwchase17/langchain/issues/1026","tags":[]}],"priority":{"score":26.6,"factors":[{"name":"EPSS percentile","points":19.73},{"name":"CVSS severity","points":6.86}]},"ssvc":{"exploitation":"none","automatable":"yes","technicalImpact":"total","timestamp":"2025-02-12T16:14:23.167174Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"langchain","vulnerableRanges":["<=0.0.131","<0.0.132"],"patched":["0.0.132"],"from":["GHSA-fprp-p869-w6q2","PYSEC-2023-18"],"provenance":"source"}],"summary":{"text":"The flaw is in the LLMMathChain chain of LangChain, through version 0.0.131, which permits prompt injection that leads to arbitrary code execution via the Python exec method.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-21T05:38:21Z"},"euvd":{"id":"EUVD-2023-0118","exploited":false,"provenance":"source"},"lineage":{"packageHistory":[{"cve":"CVE-2023-29374","published":"2023-04-05","fixed":"0.0.132","kev":false},{"cve":"CVE-2023-34540","published":"2023-06-14","fixed":"0.0.225","kev":false},{"cve":"CVE-2023-36095","published":"2023-08-05","fixed":"0.0.236","kev":false},{"cve":"CVE-2023-38896","published":"2023-08-15","fixed":"0.0.236","kev":false},{"cve":"CVE-2023-36281","published":"2023-08-22","fixed":"0.0.312","kev":false,"link":{"from":"CVE-2023-29374","to":"CVE-2023-36281","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"PyPI:langchain","fromFixed":"0.0.132","toFixed":"0.0.171","daysApart":139}]}}],"package":"PyPI:langchain"}}