Skip to content

Clarify Uri.IsLoopback SSRF limitations - #13057

Open
MihaZupan with Copilot wants to merge 5 commits into
mainfrom
copilot/add-warning-uri-isloopback-docs
Open

Clarify Uri.IsLoopback SSRF limitations#13057
MihaZupan with Copilot wants to merge 5 commits into
mainfrom
copilot/add-warning-uri-isloopback-docs

Conversation

Copilot AI commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Uri.IsLoopback alone does not guarantee that a request avoids local resources. Host resolution can still route a URI to a local address when the property returns false.

  • Documentation
    • Add an SSRF warning to Uri.IsLoopback remarks.
    • Explain that additional mitigations are required for requests targeting untrusted hosts.

Internal previews

File Preview link
xml/System/Uri.xml Learn preview

Build report

Copilot AI and others added 4 commits September 7, 2026 16:27
Co-authored-by: MihaZupan <25307628+MihaZupan@users.noreply.github.com>
Co-authored-by: MihaZupan <25307628+MihaZupan@users.noreply.github.com>
Co-authored-by: MihaZupan <25307628+MihaZupan@users.noreply.github.com>
Co-authored-by: MihaZupan <25307628+MihaZupan@users.noreply.github.com>
@MihaZupan
MihaZupan marked this pull request as ready for review September 7, 2026 17:52
@MihaZupan
MihaZupan requested a review from a team as a code owner September 7, 2026 17:52
Copilot AI lite review requested due to automatic review settings September 7, 2026 17:52

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The new warning text should be rephrased to avoid a double negative and to be more technically precise about host name resolution.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR clarifies the security limitations of using Uri.IsLoopback as a safeguard by adding an SSRF-focused warning to the API remarks, emphasizing that host resolution can still route requests to local resources.

Changes:

  • Add a warning callout to the Uri.IsLoopback remarks describing SSRF risk when resolving untrusted hosts.
File summaries
File Description
xml/System/Uri.xml Adds an SSRF warning callout in Uri.IsLoopback remarks to clarify that IsLoopback == false doesn’t prevent resolving to local addresses.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread xml/System/Uri.xml Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants