Skip to content

A2A server binds 0.0.0.0 with no authentication #1023

Closed

Description

@AmitoVrito

Summary

A2AServer.run (src/synapsekit/a2a/server.py:92) defaults to binding host="0.0.0.0" and the POST /a2a handler (:111-123) accepts unauthenticated JSON-RPC whose content flows straight into executor.run(content) — which may drive an agent with shell / python_repl / file tools. So any host on the network can drive the agent with no credential.

Severity

MEDIUM — unauthenticated network exposure of an agent executor (RCE-adjacent depending on the executor's tool set).

Fix (non-breaking)

  • Add an optional bearer-token check: constructor accepts auth_token: str | None; when set, POST /a2a requires a matching Authorization header (401 otherwise).
  • Emit a loud security warning when run() binds a non-loopback host (0.0.0.0/public) without an auth token.
  • Keep the host parameter and its current default so no existing deployment breaks; document that the executor's tool set is the trust boundary.

(Default-host change to 127.0.0.1 was considered but is behavior-breaking; deferred — warn instead.)

Acceptance

  • Regression test: request without/with wrong token → 401 when auth_token set; correct token → handled; warning emitted on 0.0.0.0 without token.
  • CHANGELOG [Unreleased] Security entry.

Activity

  1. added
    bug
    security
    on Sep 8, 2026
  2. added a commit that references this issue on Sep 12, 2026
    38df7d5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugsecurity

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions