CVE-2023-29374: LangChain - Server-Side Template Injection
- Cve: CVE-2023-29374
- Name: LangChain - Server-Side Template Injection
- Description: In LangChain through 0.0.131, the LLMMathChain chain allows prompt injection attacks that can execute arbitrary code via the Python exec method.
- Impact: Attackers can execute arbitrary code on the system, potentially leading to full system compromise.
- Remediation: Update to the latest version of LangChain where the issue is fixed.
- Vulnerability type: template_injection
- Vulnerability impact: remote_code_execution
- Requirement type: user_interaction
- Requirements: Attacker needs to control input prompt
- Labels source: projectdiscovery
- Severity: critical
- Cvss score: 9.8
- Cvss vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- Epss score: 0.39653
- Epss percentile: 0.98653
- Assignee: [email protected]
- Published at: 2023-04-05T02:15:37Z
- Age in days: 1329
- Modified at: 2026-06-17T05:49:55Z
- Patch available: yes
- Public exploits total: 2
- References total: 4
- Products total: 1
- Oss: yes
- Projects total: 2
- Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2023-29374
- Nvd status: modified
- Checked, none or zero: known exploited entries, nuclei templates, public exploits capped, rejected by nvd
Cwe
| Id | Name |
|---|---|
| CWE-74 | Improper Neutralization of Special Elements in Output Used by a Downstream Component |
Hackerone
- Reports: 1
- Rank: 5211
Public exploits
| Url | Source | Added date |
|---|---|---|
| https://github.com/hwchase17/langchain/issues/814 | nvd | 2023-04-05 |
| https://twitter.com/rharang/status/1641899743608463365/photo/1 | nvd | 2023-04-05 |
References
Same in every row:
- Source: nvd
| Url | Tags |
|---|---|
| https://github.com/hwchase17/langchain/issues/814 | Exploit, Issue Tracking, Patch |
| https://github.com/hwchase17/langchain/pull/1119 | Patch |
| https://twitter.com/rharang/status/1641899743608463365/photo/1 | Exploit |
| https://github.com/hwchase17/langchain/issues/1026 | Issue Tracking |
Products
| Product | Affected | Platform bound | Sources | Url |
|---|---|---|---|---|
| langchain:langchain | <= 0.0.131 | no | nvd | /v1/products/langchain/langchain |
Projects
| Repository | Link kinds | Indexed | Url |
|---|---|---|---|
| langchain-ai/langchain | package | yes | /v1/repositories/langchain-ai/langchain |
| hwchase17/langchain | issues, pull | yes | /v1/repositories/hwchase17/langchain |
Index
- Repositories: 485
- Repositories high signal: 240
- Packages: 1
Exploitation
- Public exploit: yes
- Public exploit count: 2
- Public exploit first date: 2023-04-05
- Remote: yes
- Hackerone reports: 1
- Checked, none or zero: known exploited, known exploited by, exploitation seen, initial access, authentication required
- Not known: known exploited since, vulncheck known exploited since, nuclei template, initial access since, exposed hosts