Skip to content

AAK-MCP-LANGGRAPHSDK-CVE-2026-118667-001: LangGraph SDK 0.4.0 to 0.4.5: v3 stream helpers put raw ids in authenticated request paths

Severity
MEDIUM
Category
Supply Chain (supply-chain)
Scanner
agent_audit_kit/scanners/mcp_cve_pins_2026_07.py
Auto-fixable
No.
SARIF name
LangGraphSdkStreamPathIds

What it detects

langgraph-sdk (PyPI) is the Python client for LangGraph API servers. Its v3 streaming module, new in 0.4.0, built two request paths from raw identifiers: get_tree requested /assistants/{assistant_id}/graph and the state fetch behind a thread's output requested /threads/{thread_id}/state, in the sync and async clients, without the _quote_path_param encoding the SDK's other endpoints use. httpx collapses .. segments and treats # as a fragment, so an application that streams with a caller-supplied assistant or thread id sends its authenticated GET to another readable path on the same server and returns the answer to the caller; through thread_id the query string is the caller's too (CVE-2026-118667, CVSS 3.1 4.3, CWE-22, GHSA-3fx2-cqw9-xr3c). The requests are reads, and the LangGraph Platform is not exposed. Checked in the wheels: 0.3.15 has no stream module, 0.4.0 and 0.4.5 interpolate both ids, and 0.4.6 encodes them (langgraph#9213).

How to fix

Upgrade langgraph-sdk to 0.4.6 or later and pin it; with RemoteGraph, upgrade langgraph to 1.2.14, which requires that SDK. Until then, accept only server-issued assistant and thread ids for streaming, never text a user or a model supplies.

To confirm the finding is gone, report only this rule:

agent-audit-kit scan . --rules AAK-MCP-LANGGRAPHSDK-CVE-2026-118667-001

Limitations

Reports langgraph-sdk from 0.4.0 below 0.4.6 where a requirements*.txt (at any depth), or at the project root a pyproject.toml, Pipfile, Pipfile.lock, poetry.lock or uv.lock, or an MCP config's uvx launch states the version, reporting a range that admits an affected version. It reads the version, not the code, so a project that never streams through the v3 module, or passes only server-issued ids, is reported too. latest was 0.4.14 on 2026-11-11 and states no version, so a bare langgraph-sdk is not reported. The advisory also lists langgraph 1.2.3 to 1.2.13, whose RemoteGraph reaches the flaw only through the SDK it resolves (those releases accept langgraph-sdk from 0.4.2); the code is the SDK's, so a project that names only langgraph is reported where a lockfile or requirements file also states an affected langgraph-sdk, and not otherwise. The JavaScript @langchain/langgraph-sdk is a different package and is not read. A file over 2 MB, or a lockfile over 32 MiB, is not read. A declaration nested more than 64 levels deep in package.json, a TOML manifest or an MCP config (an MCP server more than 62) is still judged, and reported without a line; a lockfile entry keeps its line at any depth.

References


All rules. This page is generated from the rule registry when the documentation is built; to change it, change the rule in agent_audit_kit/rules/builtin.py. To give the rule a hand-written write-up, add docs/rules/AAK-MCP-LANGGRAPHSDK-CVE-2026-118667-001.md: the page then shows that text, with the registry reference appended under it.