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
{{ message }}
Repository navigation
fetch_url() lacks private IP blocklist and redirect limit, enabling SSRF #101
fetch_url() in tools/web_tools.py uses httpx.get(..., follow_redirects=True) with no validation of the target URL or its resolved IP address. This makes the tool exploitable as a Server-Side Request Forgery (SSRF) vector: a malicious prompt can instruct the agent to fetch http://169.254.169.254/ (AWS instance metadata), http://localhost:6379/ (local Redis), http://[::1]:8080/admin, or any other internal service accessible from the machine running DevAgent.
Because follow_redirects=True has no hop limit configured, a chain of redirects from an external URL to an internal address (open redirect → internal service) also bypasses any naive URL-prefix check.
Re-validate the resolved IP after each redirect step.
Add a FETCH_URL_ALLOWED_SCHEMES = {"http", "https"} guard to block file://, ftp://, etc.
Add tests that assert fetch_url({"url": "http://169.254.169.254/"}) and fetch_url({"url": "http://localhost:6379/"}) return an error string rather than making the request.
PR #106 implements the SSRF protections and adds regression coverage for metadata and private addresses, IPv6 embedded addresses, DNS pinning, redirects, proxy bypass, and connection fallback. Local pre-PR validation passed on Python 3.12 and 3.13 (842 passed, 1 skipped; Ruff and package build passed). The upstream CI and Benchmark Canary runs currently report action_required and contain no jobs, so they have not executed yet. Could a maintainer approve the fork workflow runs so they can proceed? I will address any resulting CI feedback.
Activity
mikemikimike commentedon Oct 17, 2026
PR #106 implements the SSRF protections and adds regression coverage for metadata and private addresses, IPv6 embedded addresses, DNS pinning, redirects, proxy bypass, and connection fallback. Local pre-PR validation passed on Python 3.12 and 3.13 (842 passed, 1 skipped; Ruff and package build passed). The upstream CI and Benchmark Canary runs currently report
action_requiredand contain no jobs, so they have not executed yet. Could a maintainer approve the fork workflow runs so they can proceed? I will address any resulting CI feedback.fix: block private network access in fetch_url (#101) (#106)