Vulnerability record · PyPI
PYSEC-2026-4230
Description
Langflow's project-scoped MCP transport authenticates the caller for the project_id in the connection URL, but the subsequent resources/read operation does not authorize the resource URI being requested. An authenticated user can connect to their own project-scoped MCP endpoint and supply a crafted file-download URI that points to another user's flow-backed file. The server then reads and returns the victim file without verifying ownership or project membership.
This is a cross-user authorization bypass (userA -> userB) that allows arbitrary read access to files stored under other users' flow namespaces.
Verified against local checkout:
langflow-ai/langflowv1.8.308bf98404cfd7737fde57a2588785766cdf1b42ev1.6.8Relevant code path:
src/backend/base/langflow/api/v1/mcp_projects.py:147-193
verify_project_auth_conditional() authenticates the caller and checks access only to the project_id in the MCP transport URL.
src/backend/base/langflow/api/v1/mcp_projects.py:1238-1241
The project-scoped MCP server registers read_resource() and forwards the attacker-controlled URI directly to handle_read_resource(uri=uri).
src/backend/base/langflow/api/v1/mcp_utils.py:163-182
handle_read_resource() parses the last two URI path segments as flow_id and filename, then directly calls:
storage_service.get_file(flow_id=flow_id, file_name=filename)
No check ties the supplied flow_id back to the authenticated user or the current project.
src/backend/base/langflow/services/storage/local.py:141-149
src/backend/base/langflow/services/storage/s3.py:200-217
The storage layer performs a raw namespace read and is not authorization-aware.
The result is that authorization is enforced at MCP connection time, but not at resource-read time. Once an attacker…
Manual fix · PyPI
pip install --upgrade "langflow>=1.9.1"Sources