Root cause
Injection & unsafe execution introduced
The catalog factory accepts both HTTP and HTTPS without restricting HTTP to loopback.
How AI contributed: Direct introductionPublished Jun 10, 2026 in
dep0we/atomic-agents-stack
Provisional finding. Full causal and release verification remains incomplete.
Root cause
The catalog factory accepts both HTTP and HTTPS without restricting HTTP to loopback.
Fix
The new HTTP branch checks loopback status and requires an explicit override for remote cleartext catalogs.
Case facts
@@ -0,0 +1112,18 @@+ from urllib.parse import urlparse, urlunparse, parse_qs++ if not url or not url.strip():+ raise ValueError("HTTPMCPServerRegistryBackend catalog URL must not be empty.")++ parsed = urlparse(url)+ if parsed.scheme not in ("http", "https"):+ # Redact embedded credentials per S-F1: if the operator pastes a URL+ # like ftp://user:pass@host/ the raw URL must not appear in the error+ # message. Mirrors the PR 1 P0 redaction discipline.+ raise ValueError(+ f"HTTPMCPServerRegistryBackend catalog URL must start with "+ f"http:// or https://, got {_redact_url_for_error(url)!r}"+ )++ # Extract agent_scope from query params.+ query_params = parse_qs(parsed.query, keep_blank_values=False)+ agent_scope_values = query_params.pop("agent_scope", None)@@ -126,0 +236,18 @@++ # Path 1 — https always allowed.+ if scheme == "https":+ return++ # Paths 2 + 3 — http with host classification.+ if scheme == "http":+ # hostname is already lowercased by urlparse; use it for loopback check.+ if _is_loopback_host(hostname):+ # LOOPBACK-AUTO: always allowed regardless of opt-in.+ return+ if allow_http_non_loopback:+ # ENV OPT-IN: operator has explicitly unlocked non-loopback http.+ return+ # Non-loopback http without opt-in → refuse.+ safe_url = _redact_url_for_error(url)+ raise ValueError(+ f"HTTPMCPServerRegistryBackend: cleartext http:// is refused for "AI-assisted change f24f376750e0cf554fe08da9b7e96c97c007af6c12c038f65fd5fe0e14e6cd98 · Fix 118424d1f13fa8f00c3761c5cfc57a839916d66cf13e56327baf48aec133f986