AlinsRan commented on PR #13959: URL: https://github.com/apache/apisix/pull/13959#issuecomment-5746892591
> [P1] Wildcard Route hosts still permit DNS rebinding Agreed — a wildcard says which requests reach the Route, not which origins are trusted. Fixed in 76c1fbabf. Default trust is now derived only from **literal** hosts in `host` / `hosts`. An entry beginning with `*` is skipped when collecting them, so a Route whose only host predicate is a wildcard has no anchor at all and refuses every request that carries an `Origin`. Such a Route accepts one through `allowed_origins` and nowhere else. New regressions, `hosts: ["*.example.com"]`, `Host` and `Origin` both `attacker.example.com`: | Transport | | | |---|---|---| | Streamable HTTP | no `allowed_origins` | **403** | | SSE | no `allowed_origins` | **403** | | Streamable HTTP | `allowed_origins: ["http://app.example.com"]` | `app.example.com` → 200, `attacker.example.com` → 403 | A Route mixing both — `hosts: ["*.example.com", "mcp.example.com"]` — trusts `mcp.example.com` only, since that is the one entry the operator wrote out. Docs in both languages now state the wildcard case explicitly rather than saying "the hosts the Route declares". -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
