Conversation
added 2 commits
August 5, 2026 21:16
…baseUrl Client-supplied provider_options.baseUrl could override the SearXNG search provider's server-side request target with no SSRF protection, allowing any API-key holder to make the server fetch internal/private addresses (port scanning, cloud metadata 169.254.169.254, local services). Fix: validate client-supplied baseUrl overrides in resolveBaseUrl(): - reject non-http(s) protocols - reject internal/private/loopback/metadata hosts via assertPublicUrl() Provider-configured default baseUrl remains trusted (admin-controlled). Verified end-to-end: internal target no longer receives the request (400 'Blocked URL: private IP'), public overrides still pass through. Refs: decolua#3049
src/lib/oauth/utils/ui.js imports chalk and dashboard provider pages import prop-types, but neither was declared in package.json — builds fail with 'Module not found' on a fresh install. Add both to dependencies.
Author
|
Hi @decolua — this PR fixes the SSRF reported in #3049 and is ready to merge:
Verification:
Both commits are on |
Author
|
Superseded by a consolidated security hardening PR — combining this with the auth fixes from #3060 into a single, rebased PR for easier review. |
This was referenced Aug 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes SSRF reported in #3049: client-supplied
provider_options.baseUrlon/v1/searchcould override the SearXNG provider's server-side request target with no SSRF protection, allowing any API-key holder to make the server fetch internal/private addresses.Vulnerability
The resulting URL is fetched server-side (
open-sse/handlers/search/index.js:103) with no SSRF guard → internal port scanning, cloud metadata access (169.254.169.254), local service probing. Verified end-to-end.Fix
Validate client-supplied
baseUrloverrides inresolveBaseUrl():file://,gopher://, ...)assertPublicUrl()guard (src/shared/utils/ssrfGuard.js)Provider-configured default
baseUrlremains trusted (admin-controlled), so existing deployments are unaffected.Verification
tests/unit/search-ssrf-guard.test.js): public overrides pass, loopback/private/metadata/non-http all rejected400 {"error":{"message":"Blocked URL: private IP"}}and the internal target receives no request; publichttps://searxng.example.comoverride still passes the guard (502 only because network is unreachable)Notes
CVE-2026-55641 (fixed 0.5.2) covered the Host-header auth bypass but did not remove the client-controlled baseUrl override — this is the residual SSRF.