{"id":"CVE-2023-29374","aliases":["GHSA-fprp-p869-w6q2","PYSEC-2023-18"],"url":"https://o3.security/vulnerability/CVE-2023-29374","summary":"LangChain vulnerable to code injection","details":"In LangChain through 0.0.131, the LLMMathChain chain allows prompt injection attacks that can execute arbitrary code via the Python exec method.","published":"2023-04-05T00:00:00Z","modified":"2026-08-12T03:51:16.613350193Z","cvss":{"score":9.8,"severity":"CRITICAL","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"},"epss":null,"cisaKev":null,"exploitsKnown":2,"affectedPackages":[{"ecosystem":"PyPI","name":"langchain","fixedVersion":null}],"fix":{"url":"https://github.com/hwchase17/langchain/pull/1119","label":"hwchase17/langchain#1119"},"references":[{"type":"WEB","url":"https://twitter.com/rharang/status/1641899743608463365/photo/1"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/29xxx/CVE-2023-29374.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2023-29374"},{"type":"REPORT","url":"https://github.com/hwchase17/langchain/issues/1026"},{"type":"REPORT","url":"https://github.com/hwchase17/langchain/issues/814"},{"type":"FIX","url":"https://github.com/hwchase17/langchain/pull/1119"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-08-12T03:51:16.613350193Z"}}