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
Several agent HTTP tools and one loader fetch attacker/LLM/document-derived URLs with no SSRF guard, or a fail-open one. The repo already ships a correct, fail-closed reference guard at loaders/_url_guard.py (validate_public_url / assert_response_url_public) used by loaders/web.py and loaders/sitemap.py. These sites don't use it:
agents/tools/http_request.py:101 — LLM-supplied url passed straight to session.request(...). No scheme allowlist, no private-IP block → http://169.254.169.254/ metadata exfil, file:///internal services.
agents/tools/api_builder.py — worse: request URL assembled from an OpenAPI spec's servers[0].url + LLM-selected path, and the spec itself is fetched from a remote openapi_url. No scheme/IP validation; an absolute path in urljoin overrides the base.
agents/tools/web_scraper.py:23-42 — rolls its own guard that fails open: on socket.gaierror/ValueError it returns (allows), is IPv4-only via gethostbyname, and checks only the first resolved address.
loaders/rss.py:20 — feedparser.parse(self._url) on an unvalidated URL; accepts file:// (local file read), unlike its hardened siblings.
Severity
HIGH (http_request/graphql/api_builder — clean metadata-exfil path) / MEDIUM (web_scraper fail-open, rss file://).
Fix (non-breaking)
Route every fetch through loaders/_url_guard.validate_public_url before the request; re-validate on redirect hops where the client follows them (assert_response_url_public). For rss.py, block non-http(s) schemes and private IPs while still allowing plain local file paths (no scheme) for backward compatibility. Delete web_scraper.py's bespoke fail-open guard in favour of the shared one.
Acceptance
Regression tests: 169.254.169.254, 127.0.0.1, RFC1918, and file:// all rejected at each site; DNS-failure fails closed; public URLs still allowed.
Activity
test: update web_scraper/graphql tests for the shared SSRF guard
fix(agents): guard agent HTTP tools and RSS loader against SSRF
test(agents): update api_builder spec-fetch test for SSRF opener