web_fetch DNS-rebinding gap #234

Open
opened 2026-11-21 12:37:05 +00:00 by johannes · 0 comments
Owner

Location: crates/hx-tools/src/web.rs (host check before request)
What is hacky: the private-range check resolves the host, then the client resolves again to connect.
Proper fix: pin the resolved IP via ClientBuilder::resolve.
Original comment: "ponytail: resolve-then-connect leaves a DNS-rebinding gap; pin the resolved IP via ClientBuilder::resolve if that matters."

Found by the comment audit: the comment excusing this was deleted (see scripts/lint-comments.sh).

Location: crates/hx-tools/src/web.rs (host check before request) What is hacky: the private-range check resolves the host, then the client resolves again to connect. Proper fix: pin the resolved IP via `ClientBuilder::resolve`. Original comment: "ponytail: resolve-then-connect leaves a DNS-rebinding gap; pin the resolved IP via `ClientBuilder::resolve` if that matters." Found by the comment audit: the comment excusing this was deleted (see scripts/lint-comments.sh).
johannes added the tools label 2026-11-21 12:37:05 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: johannes/hx#234