CVE-2023-29374
CRITICAL9.8EPSS 3.8%LangChain vulnerable to code injection
Published: 4/5/2023Modified: 2/12/2025
Description
In LangChain through 0.0.131, the `LLMMathChain` chain allows prompt injection attacks that can execute arbitrary code via the Python `exec()` method.
Affected packages (2)
- PyPI/langchainfrom 0, <= 0.0.131
- PyPI/langchainfrom 0, < 0.0.132
CVSS scores
| Source | Version | Severity | Vector |
|---|---|---|---|
| osv | CVSS 4.0 | — | 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 |
| osv | CVSS 3.1 | CRITICAL9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
References (7)
- ADVISORYhttps://nvd.nist.gov/vuln/detail/CVE-2023-29374
- PATCHhttps://github.com/langchain-ai/langchain
- WEBhttps://github.com/hwchase17/langchain/issues/1026
- WEBhttps://github.com/hwchase17/langchain/issues/814
- WEBhttps://github.com/hwchase17/langchain/pull/1119
- WEBhttps://github.com/pypa/advisory-database/tree/main/vulns/langchain/PYSEC-2023-18.yaml
- WEBhttps://twitter.com/rharang/status/1641899743608463365/photo/1