Root cause
SSRF & network boundaries
The new SearXNG helper sends the configured search URL through the global fetch function.
How AI contributed: Flawed AI-written codePublished Aug 5, 2026 in
n8n-io/n8nAll 6 findings in this repository
Provisional finding. Full causal and release verification remains incomplete.
Root cause
The new SearXNG helper sends the configured search URL through the global fetch function.
Fix
The agent runtime injects the policy-aware transport into fallback searches.
Case facts
@@ -0,0 +40,18 @@+ const params = new URLSearchParams({+ q: searchQuery,+ format: 'json',+ pageno: '1',+ });++ const response = await fetch(`${normalizedUrl}/search?${params}`, {+ headers: {+ Accept: 'application/json',+ },+ });++ if (!response.ok) {+ throw new Error(`SearXNG search failed: ${response.status} ${response.statusText}`);+ }++ const data = (await response.json()) as SearxngApiResponse;+ const maxResults = options.maxResults ?? 5;@@ -41,11 +42,11 @@ q: searchQuery, format: 'json', pageno: '1', }); - const response = await fetch(`${normalizedUrl}/search?${params}`, {+ const response = await fetchImpl(`${normalizedUrl}/search?${params}`, { headers: { Accept: 'application/json', }, ...(options.abortSignal ? { signal: options.abortSignal } : {}), });@@ -374,6 +374,13 @@ instrumentation?.mcpFetch ?? createAiMcpFetch(this.outboundHttp, this.ssrfConfig, this.ssrfProtectionService); + // Transport for fallback web-search calls+ const webSearchFetch = createWebSearchFetch(+ this.outboundHttp,+ this.ssrfConfig,+ this.ssrfProtectionService,+ );+ const buildMcpClient = async (server: AgentJsonMcpServerConfig) => await buildMcpClientForServer(server, { credentialProvider,@@ -353,3 +354,11 @@+ args.query,+ {+ maxResults: args.maxResults,+ includeDomains: args.includeDomains,+ excludeDomains: args.excludeDomains,+ },+ webSearchFetch,+ ); }, }; }AI-assisted change 9f3c51c6e6948d0f4583deec5385f74e819bd13d1eaf2092c749f4273e592043 · Fix 4349b9b8391af06634553b67b159d1a3bb71786289f901667105736d28893976