You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The fetch_url tool validator blocks common internal addresses (localhost, 127.0.0.1, 192.168.x.x) but does not block the IPv6 loopback address ::1. This means the SSRF guard can be bypassed by passing a URL like http://[::1]:8080.
Environment
OS: Any
Node version: Any
Nanocoder version: Latest
Provider: N/A
Model: N/A
Steps to Reproduce
Open source/tools/fetch-url.tsx.
Navigate to fetchUrlValidator (~line 150).
Observe the hostname blocklist — localhost, 127.0.0.1, and 0.0.0.0 are present, but [::1] and ::1 are missing.
Call the tool with url: "http://[::1]:8080" — it passes validation.
Expected Behavior
The validator should reject requests to [::1] and ::1 with the same error it gives for 127.0.0.1.
Actual Behavior
The request passes validation and proceeds to fetch content from the IPv6 loopback address.
Logs/Screenshots
N/A
Additional Context
url-utils.ts already includes [::1] and ::1 in its LOCAL_HOSTNAMES set — the validator in fetch-url.tsx simply missed them.
Fix: add hostname === '[::1]' and hostname === '::1' to the blocklist in fetchUrlValidator.
Note: This issue is intentionally kept small and is suitable for first-time contributors. If you're interested in working on it, please leave a comment below and ask to be assigned before opening a pull request.
I have searched existing issues to ensure this is not a duplicate
I can reproduce this issue consistently
This issue occurs with the latest version of nanocoder
Activity
nightcityblade commentedon Aug 1, 2026
Hi, I'd like to work on this. Could you please assign it to me? I'll submit a focused PR shortly.
MsadafK commentedon Aug 1, 2026
Hi @akramcodez , I would like to work on this issue. Please assign it to me!