Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/a2a-server/src/http/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,7 @@ export async function createApp() {
error:
'Listing all task metadata is only supported when using InMemoryTaskStore.',
});
return;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

security-high high

The /tasks/metadata endpoint lacks any authentication or authorization checks. While this PR correctly adds a return statement to prevent a server crash (DoS) when using a non-in-memory task store, the endpoint remains publicly accessible. Any unauthenticated user can retrieve metadata for all tasks currently in memory, which may include sensitive information such as workspace paths and agent settings for all users. It is recommended to apply authentication middleware to this route and ensure that users can only access metadata for tasks they own.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

security-high high

The /tasks/metadata endpoint lacks proper authorization checks. It returns metadata for all tasks currently in the InMemoryTaskStore, which includes sensitive information such as workspacePath and other agent settings. An authenticated user can access this information for all tasks, not just their own, leading to unauthorized information disclosure.

Remediation: Implement an authorization check to ensure that the user requesting the metadata is authorized to view it. Typically, this involves filtering the tasks to only include those owned by the current user or requiring administrative privileges to list all tasks.

}
try {
const wrappers = agentExecutor.getAllTasks();
Expand Down
Loading