Skip to content

fix(fetch-url): block IPv6 loopback in the SSRF guard - #811

Merged
will-lamerton merged 2 commits into
Nano-Collective:mainfrom
serhiizghama:fix/fetch-url-ipv6-loopback
Aug 9, 2026
Merged

will-lamerton merged 2 commits into
Nano-Collective:mainfrom
serhiizghama:fix/fetch-url-ipv6-loopback

Conversation

@serhiizghama

Copy link
Copy Markdown
Contributor

Closes #734. The fetch_url validator blocks localhost/127.0.0.1/0.0.0.0 but not IPv6 loopback, so http://[::1]:8080 sailed past the guard and could reach local services.

Added [::1], the IPv4-mapped form [::ffff:7f00:1], and the unspecified [::] to the same blocklist. The URL parser already normalizes every loopback spelling ([::1], fully expanded, [::ffff:127.0.0.1]) to those canonical hostnames, so exact matches cover the variants — the added tests check the expanded and mapped forms too, and fail on main without the fix.

@will-lamerton

Copy link
Copy Markdown
Member

Great work - thanks again @serhiizghama :)

@will-lamerton
will-lamerton merged commit 77b2a45 into Nano-Collective:main Aug 9, 2026
1 check passed
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.

[Bug] fetch_url Tool Doesn't Block IPv6 Loopback Address (::1)

2 participants