langchain-ai/langchain · Security
LangChain vulnerable to code injection
- GHSA ID
- GHSA-fprp-p869-w6q2
- CVE ID
- CVE-2023-29374
- Severity
- critical
- Published
- Updated
- CVSS
- 9.8 · CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- CVSS v3
- 9.8 · CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- CVSS v4
- 9.3 · 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
Description
In LangChain through 0.0.131, the LLMMathChain chain allows prompt injection attacks that can execute arbitrary code via the Python exec() method.
CWEs
- CWE-74 · Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')
- CWE-94 · Improper Control of Generation of Code ('Code Injection')
References
- https://nvd.nist.gov/vuln/detail/CVE-2023-29374 ↗
- https://github.com/hwchase17/langchain/issues/1026 ↗
- https://github.com/hwchase17/langchain/issues/814 ↗
- https://github.com/hwchase17/langchain/pull/1119 ↗
- https://twitter.com/rharang/status/1641899743608463365/photo/1 ↗
- https://github.com/pypa/advisory-database/tree/main/vulns/langchain/PYSEC-2023-18.yaml ↗
- https://github.com/advisories/GHSA-fprp-p869-w6q2 ↗