fix(network): scope fake-IP SSRF policy to provider hosts#76887
fix(network): scope fake-IP SSRF policy to provider hosts#76887
Conversation
|
Codex review: needs maintainer review before merge. Summary Reproducibility: yes. source inspection gives a high-confidence reproduction path: make provider or trusted web endpoint DNS resolve to Next step before merge Security Review detailsBest possible solution: Finish maintainer review on this draft and, if the security boundary is accepted, land this narrower host-scoped policy as the superseding fix for #76530 and #76549. Do we have a high-confidence way to reproduce the issue? Yes, source inspection gives a high-confidence reproduction path: make provider or trusted web endpoint DNS resolve to Is this the best way to solve the issue? Yes, the proposed direction appears narrower than the related broad allow-host proposals because it uses target hostname allowlisting plus specific fake-IP range flags instead of general private-network bypass. Final merge should wait for the draft/protected review and completed validation. What I checked:
Likely related people:
Remaining risk / open question:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 03e35b1d8392. |
63b72d9 to
a32607a
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a32607a72d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| return { | ||
| allowRfc2544BenchmarkRange: true, | ||
| allowIpv6UniqueLocalRange: true, | ||
| hostnameAllowlist: [parsed.hostname], |
There was a problem hiding this comment.
Reject fake-IP allowlist policy for literal IP base URLs
ssrfPolicyFromHttpBaseUrlFakeIpHostnameAllowlist currently returns a policy even when baseUrl is an IP literal, which turns on allowRfc2544BenchmarkRange/allowIpv6UniqueLocalRange and allows direct requests to 198.18.0.0/15 or fc00::/7 without allowPrivateNetwork. That broadens access beyond the intended “fake-IP DNS answer for trusted hostnames” scope and weakens SSRF protections for misconfigured or attacker-influenced base URLs; this helper should bail out when parsed.hostname is an IP literal.
Useful? React with 👍 / 👎.
|
Landed via rebase. Landed commit: edb7e00 Thanks @zqchris for the fake-IP DNS reports in #76530 and #76549. |
No description provided.