Details
Impact
Any 9router reachable on a network (default 0.0.0.0 bind, plus Docker -p, tunnel, or tailscale — all first-class features) can be:
- used as a free AI relay billed to the victim's provider accounts, exhausting quota and exfiltrating data through their keys; and
- used to reach internal services / cloud metadata (
169.254.169.254) with the response reflected to the attacker.
Unauthenticated, no user interaction, default configuration. The only precondition is the normal one (≥1 configured provider).
Recommended fix
- Determine "local" from the socket peer IP, never the
Hostheader — treat as local only if the TCP peer is127.0.0.0/8/::1. - Bind
127.0.0.1by default; require an explicit, warned opt-in for0.0.0.0; fix the CLI to not print "localhost" when bound to all interfaces. - For any non-loopback peer, require a valid API key regardless of
requireApiKey; addrequireApiKey: truetoDEFAULT_SETTINGS(fail-closed). - Validate
provider_options.baseUrlagainst an allowlist (or drop the override) and block requests to private/link-local ranges inresolveBaseUrl. - Remove
Access-Control-Allow-Origin: *from/v1GET metadata routes.