CVE-2026-118667
Path traversal in LangGraph SDK allows attacker‑controlled IDs to bypass auth.
- CVSS 4.3
- CWE-22
- Input Validation and Sanitization
- Remote
LangGraph Python SDK is used to connect to running LangGraph API servers, manage assistants, threads and stream runs from Python applications. From langgraph-sdk 0.4.0 until 0.4.6, and from langgraph 1.2.3 until 1.2.14 when RemoteGraph v3 streaming uses an affected langgraph-sdk version, the synchronous and asynchronous v3 stream get_tree and _fetch_state helpers interpolate caller-controlled assistant_id and thread_id values into authenticated GET request paths without using _quote_path_param. Relative path segments can therefore be normalized into another readable path on the configured server while retaining authentication headers. This issue is fixed in langgraph-sdk 0.4.6 and langgraph 1.2.14.
- CWE
- CWE-22
- CVSS base score
- 4.3
- Published
- 2026-10-28
- OWASP
- A01 Broken Access Control
- Orthogonal defect classification
- Interface
- Code defect classification
- Incorrect Interface
- Category
- Input Validation and Sanitization
- Subcategory
- Path Traversal
- Accessibility scope
- Remote
- Impact
- Unauthorized Access
- Affected component
- langgraph-sdk
- Fixed by upgrading
- Yes
Solution
Upgrade to langgraph‑sdk 0.4.6 (or later) and langgraph 1.2.14 (or later).
Vulnerable code sample
from langgraph_sdk import RemoteGraph
from langgraph_sdk._helpers import _fetch_state
def get_thread_state(graph: RemoteGraph, assistant_id: str, thread_id: str):
# VULNERABLE: interpolates unsanitized IDs into URL path
return _fetch_state(graph, f"/assistants/{assistant_id}/threads/{thread_id}/state")Patched code sample
from langgraph_sdk import RemoteGraph
from langgraph_sdk._helpers import _fetch_state
from langgraph_sdk._utils import _quote_path_param
def get_thread_state(graph: RemoteGraph, assistant_id: str, thread_id: str):
# FIX: safely quote path parameters to prevent traversal
safe_assistant = _quote_path_param(assistant_id)
safe_thread = _quote_path_param(thread_id)
return _fetch_state(graph, f"/assistants/{safe_assistant}/threads/{safe_thread}/state")Published fix
Public sources link this CVE to the changes below. The code samples above were generated to illustrate the defect; these links lead to the code the project actually changed.
- fix(sdk-py): percent-encode thread_id and assistant_id in thread stream requests (#9213) (langchain-ai/langgraph)
libs/sdk-py/langgraph_sdk/_async/stream.py,libs/sdk-py/langgraph_sdk/_async/stream.py · AsyncThreadStream._fetch_state,libs/sdk-py/langgraph_sdk/_async/stream.py · _AgentModule.get_tree,libs/sdk-py/langgraph_sdk/_sync/stream.py,libs/sdk-py/langgraph_sdk/_sync/stream.py · SyncThreadStream._fetch_state,libs/sdk-py/langgraph_sdk/_sync/stream.py · _SyncAgentModule.get_tree
Cite this entry
@misc{vaitp:cve2026118667,
title = {{Path traversal in LangGraph SDK allows attacker‑controlled IDs to bypass auth.}},
author = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
year = {2026},
note = {VAITP Python Vulnerability Dataset, entry CVE-2026-118667},
howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2026-118667/}}
}
Introducing the "VAITP dataset": a specialized repository of Python vulnerabilities and patches, meticulously compiled for the use of the security research community. As Python's prominence grows, understanding and addressing potential security vulnerabilities become crucial. Crafted by and for the cybersecurity community, this dataset offers a valuable resource for researchers, analysts, and developers to analyze and mitigate the security risks associated with Python. Through the comprehensive exploration of vulnerabilities and corresponding patches, the VAITP dataset fosters a safer and more resilient Python ecosystem, encouraging collaborative advancements in programming security.
The supreme art of war is to subdue the enemy without fighting.
Sun Tzu – “The Art of War”
:: Shaping the future through research and ingenuity ::
