#2212·agentscope

security(app): reject file URLs in chat input

Author: ShiroKSHCreated Jul 31, 2026Updated Sep 30, 2026
Labelsstate/stale-issue

Problem

The Chat API accepts DataBlock URL sources from request JSON. A file:// source reaches media formatters, which read the referenced path on the service host before embedding the bytes in a request to the configured model provider.

The service example is network-facing and its current identity dependency trusts a request header, so a remote caller able to run an agent can request a service-host path instead of uploading media content.

Scope

Reject file:// URL sources at the ChatRequest boundary. This preserves trusted SDK and workspace flows that intentionally use local files, while keeping remote URLs and base64 uploads available to API clients.

Regression coverage

Validate that a request containing a file:// source is rejected during request parsing before the agent or any formatter can run.

Source: agentscope-ai/agentscope