CVE-2023-29374: LangChain code injection via LLMMathChain
Attack on AI2 Disclosed vulnerabilityInfrastructure vulnerabilityPrompt injection
LangChain contains a code injection vulnerability via prompt injection attacks that execute arbitrary code using Python exec. The issue affects versions up to 0.0.131.
disclosed CVENo confirmed exploitation, so this record is tracked as a disclosed vulnerability and not counted as an incident. It moves into the counts if CISA or the vendor confirms exploitation. Why
Details
- type
- Attack on AIAn AI model, agent or AI-powered product was the thing exploited, abused or leaked.
- categories
- Infrastructure vulnerabilityprimaryCVEs and advisories in AI frameworks, inference servers, MCP servers, AI developer tools and hosting stacks.
- Prompt injectionUntrusted content (web pages, documents, emails, tool output) steers a model into ignoring its instructions.
- Infrastructure vulnerabilityprimary
- owasp llm top 10
- mitre atlas
- Both rows are derived from the type and categories (OWASP 2025 edition, ATLAS release 2026.09), not classified per record. How
- severity
- 2 · Disclosed vulnerabilityCVE or vendor advisory, patched or patchable, no confirmed exploitation.
- targets
- Framework / tooling
- products
- langchain
- incident date
- 5 Apr 2023
- first reported
- 5 Apr 2023
- origin
- GitHub Advisory DatabaseVulnerability record from NVD / the GitHub Advisory Database. This product uses the NVD API but is not endorsed or certified by the NVD.
- classifier confidence
- 0.95 · published at or above 0.80; see the methodology
- tags
- CVE-2023-29374 · langchain · code-injection
- record
- created 2026-10-18 07:00Z · updated 2026-10-18 10:04Z · json
Sources · 2
- 2023-04-05CVE-2023-29374: LangChain vulnerable to code injectionGitHub Advisory Database · github.com/advisories/GHSA-fprp-p869-w6q2
- 2023-04-05CVE-2023-29374: In LangChain through 0.0.131, the LLMMathChain chain allows prompt injection attacks that can execute arbitrary code via the…NVD · nvd.nist.gov/vuln/detail/CVE-2023-29374
Titles and links belong to their publishers. The summary above is written by GCD AI RADAR in its own words; data is CC BY-SA 4.0.
Related incidents
- 2023-10-21CVE-2023-32785: Langchain SQL Injection vulnerability2 Disclosedon AIInfra vulnPrompt inj.1 src
- 2023-03-26LLM Application Frameworks Allow Remote Code Execution via Prompting1 Researchon AIPrompt inj.Agent hijack4 src
- 2024-11-21CVE-2024-58351: Flowise OverrideConfig security vulnerability2 Disclosedon AIInfra vulnPrompt inj.2 src
- 2024-10-29CVE-2024-8309: LangChain GraphCypherQAChain SQL injection vulnerability2 Disclosedon AIPrompt inj.Infra vuln2 src
- 2024-10-29CVE-2024-7042: LangChainJS GraphCypherQAChain SQL injection vulnerability2 Disclosedon AIPrompt inj.Infra vuln2 src
- 2024-09-19CVE-2024-46946: LangChain Experimental Eval Injection vulnerability2 Disclosedon AIInfra vulnPrompt inj.2 src