Conversation
✅ Docs preview readyThe preview is ready to be viewed. View the preview File Changes 0 new, 1 changed, 0 removedBuild ID: 421610d537da244ff421f5d0 URL: https://www.apollographql.com/docs/deploy-preview/421610d537da244ff421f5d0 |
|
✅ Changeset file added - thank you! |
Review SummaryThis PR adds Host header validation middleware to mitigate DNS rebinding attacks (GHSA-fv85-8h22-h4rg). The implementation validates incoming Host headers against localhost variants (with port matching) and configurable custom hosts, returning 403 Forbidden for invalid requests. Findings: No blocking issues found.
Test Coverage Assessment: Excellent. The test suite covers:
Documentation: The config-file.mdx updates clearly explain the new Final Recommendation: ✅ Approve Reviewed by Claude Code Opus 4.5 |
This PR addresses a reported DNS rebinding vulnerability. The MCP server was vulnerable because it didn't validate the
Hostheader on incoming HTTP requests, allowing attackers to manipulate the server via DNS rebinding. This PR adds Host header validation middleware that rejects requests with unexpected Host headers, returning403 Forbidden. The protection is enabled by default for StreamableHttp transport and validates against localhost values with port matching. Custom hosts can be configured viahost_validation.allowed_hostsfor deployments behind reverse proxies.Testing
Start the server:
Invalid requests (should return 403 Forbidden)
Attacker domain:
Wrong port:
Valid requests (should return 200):