CVE-2024-28088: LangChain: path traversal enables RCE and API key theft
HIGH PoC AVAILABLE CISA: ATTENDAny LangChain deployment through v0.1.10 where external users can influence chain loading paths is directly exploitable for remote code execution or LLM API key theft. A public PoC exists, eliminating any skill barrier. Patch to langchain-core ≥0.1.29 immediately and rotate all LLM API keys on affected systems.
Risk Assessment
High risk in practice despite the CVSS 8.1 score. Low complexity, network-reachable attack with a public PoC makes this trivially exploitable by any threat actor. The dual-outcome nature—RCE or API key exfiltration—means organizations face both infrastructure compromise and financial exposure (unauthorized LLM API usage). LangChain's widespread adoption in production AI pipelines significantly increases blast radius.
Affected Systems
| Package | Ecosystem | Vulnerable Range | Patched |
|---|---|---|---|
| langchain | pip | — | No patch |
Do you use langchain? You're affected.
Severity & Risk
Attack Surface
Recommended Action
5 steps-
PATCH
upgrade langchain-core to ≥0.1.29 immediately—this is the only full fix.
-
AUDIT
review all load_chain() and hub.pull() call sites; ensure no user-controlled input reaches the path parameter.
-
ROTATE
revoke and replace all LLM API keys (OpenAI, Anthropic, Cohere, etc.) present in environments running affected versions.
-
HARDEN
run LangChain processes under least-privilege accounts with restricted filesystem access; use container isolation or chroot where feasible.
-
DETECT
monitor for anomalous outbound connections from AI app containers, unexpected file access outside expected directories, and API key usage spikes indicating credential theft.
CISA SSVC Assessment
Source: CISA Vulnrichment (SSVC v2.0). Decision based on the CISA Coordinator decision tree.
Classification
Compliance Impact
This CVE is relevant to:
Frequently Asked Questions
What is CVE-2024-28088?
Any LangChain deployment through v0.1.10 where external users can influence chain loading paths is directly exploitable for remote code execution or LLM API key theft. A public PoC exists, eliminating any skill barrier. Patch to langchain-core ≥0.1.29 immediately and rotate all LLM API keys on affected systems.
Is CVE-2024-28088 actively exploited?
Proof-of-concept exploit code is publicly available for CVE-2024-28088, increasing the risk of exploitation.
How to fix CVE-2024-28088?
1. PATCH: upgrade langchain-core to ≥0.1.29 immediately—this is the only full fix. 2. AUDIT: review all load_chain() and hub.pull() call sites; ensure no user-controlled input reaches the path parameter. 3. ROTATE: revoke and replace all LLM API keys (OpenAI, Anthropic, Cohere, etc.) present in environments running affected versions. 4. HARDEN: run LangChain processes under least-privilege accounts with restricted filesystem access; use container isolation or chroot where feasible. 5. DETECT: monitor for anomalous outbound connections from AI app containers, unexpected file access outside expected directories, and API key usage spikes indicating credential theft.
What systems are affected by CVE-2024-28088?
This vulnerability affects the following AI/ML architecture patterns: agent frameworks, LLM application pipelines, RAG pipelines, chatbot backends, AI orchestration layers.
What is the CVSS score for CVE-2024-28088?
CVE-2024-28088 has a CVSS v3.1 base score of 8.1 (HIGH). The EPSS exploitation probability is 13.44%.
Technical Details
NVD Description
LangChain through 0.1.10 allows ../ directory traversal by an actor who is able to control the final part of the path parameter in a load_chain call. This bypasses the intended behavior of loading configurations only from the hwchase17/langchain-hub GitHub repository. The outcome can be disclosure of an API key for a large language model online service, or remote code execution. (A patch is available as of release 0.1.29 of langchain-core.)
Exploitation Scenario
An authenticated user of a LangChain-powered application (e.g., an internal AI assistant or customer-facing chatbot) crafts a chain path value such as `../../../../home/appuser/.env` or points to a malicious YAML config hosted on an attacker-controlled server. When the application calls load_chain() with this attacker-supplied value, the traversal bypasses the GitHub hub restriction. To achieve credential theft, the attacker reads .env files containing OPENAI_API_KEY or ANTHROPIC_API_KEY. To achieve RCE, they craft a malicious chain YAML that invokes Python's exec or subprocess, establishing a reverse shell on the server. With low privileges required and a public PoC available, this is an entry-level exploit for a high-value target.
Weaknesses (CWE)
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N References
- github.com/PinkDraconian/PoC-Langchain-RCE/blob/main/README.md Exploit 3rd Party
- github.com/langchain-ai/langchain/blob/f96dd57501131840b713ed7c2e86cbf1ddc2761f/libs/core/langchain_core/utils/loading.py Product 3rd Party
- github.com/langchain-ai/langchain/pull/18600 Exploit Issue Patch
- github.com/ARPSyndicate/cve-scores Exploit
- github.com/franzheffa/video-search-and-summarization-viize Exploit
- github.com/gil-feldman-glidetalk/video-search-and-summarization Exploit
- github.com/levpachmanov/cve-2024-28088-poc Exploit
- github.com/nomi-sec/PoC-in-GitHub Exploit
- github.com/rmkraus/video-search-and-summarization Exploit
- github.com/seal-community/patches Exploit
- github.com/tanjiti/sec_profile Exploit
- github.com/zgimszhd61/llm-security-quickstart Exploit
Timeline
Related Vulnerabilities
CVE-2025-2828 10.0 LangChain RequestsToolkit: SSRF exposes cloud metadata
Same package: langchain CVE-2023-34541 9.8 LangChain: RCE via unsafe load_prompt deserialization
Same package: langchain CVE-2023-29374 9.8 LangChain: RCE via prompt injection in LLMMathChain
Same package: langchain CVE-2023-34540 9.8 LangChain: RCE via JiraAPIWrapper crafted input
Same package: langchain CVE-2023-36258 9.8 LangChain: unauthenticated RCE via code injection
Same package: langchain
AI Threat Alert