Repository navigation
fix(security): block SSRF via /v1/search Firecrawl provider_options.baseUrl - #10738
Merged
diegosouzapw merged 1 commit intoAug 19, 2026
Merged
Conversation
…aseUrl The client-controlled provider_options.baseUrl (and legacy top-level baseUrl) override was used verbatim to build the server-side fetch target in buildFirecrawlSearchRequest(), with no SSRF validation. A caller with a valid API key could redirect the search request at an internal host (loopback, RFC1918, or a cloud-metadata endpoint) and read the response back through the normal search result shape. Validate the override with the existing outboundUrlGuard (parseAndValidatePublicUrl) before it is used to build the fetch URL. jinaSearch and perplexitySearch were checked and do not accept a client-controlled baseUrl, so only firecrawlSearch needed the guard. Reported-by: zmf963
giauphan
pushed a commit
to giauphan/OmniRoute
that referenced
this pull request
Aug 20, 2026
…aseUrl (diegosouzapw#10738) The client-controlled provider_options.baseUrl (and legacy top-level baseUrl) override was used verbatim to build the server-side fetch target in buildFirecrawlSearchRequest(), with no SSRF validation. A caller with a valid API key could redirect the search request at an internal host (loopback, RFC1918, or a cloud-metadata endpoint) and read the response back through the normal search result shape. Validate the override with the existing outboundUrlGuard (parseAndValidatePublicUrl) before it is used to build the fetch URL. jinaSearch and perplexitySearch were checked and do not accept a client-controlled baseUrl, so only firecrawlSearch needed the guard. Reported-by: zmf963 Co-authored-by: Markus Hartung <mail@hartmark.se>
This was referenced Aug 23, 2026
Merged
muhamadgalihsaputra
pushed a commit
to niyatna/NiyatnaRoute
that referenced
this pull request
Sep 27, 2026
…aseUrl (diegosouzapw#10738) The client-controlled provider_options.baseUrl (and legacy top-level baseUrl) override was used verbatim to build the server-side fetch target in buildFirecrawlSearchRequest(), with no SSRF validation. A caller with a valid API key could redirect the search request at an internal host (loopback, RFC1918, or a cloud-metadata endpoint) and read the response back through the normal search result shape. Validate the override with the existing outboundUrlGuard (parseAndValidatePublicUrl) before it is used to build the fetch URL. jinaSearch and perplexitySearch were checked and do not accept a client-controlled baseUrl, so only firecrawlSearch needed the guard. Reported-by: zmf963 Co-authored-by: Markus Hartung <mail@hartmark.se>
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
/v1/searchallowed a client with a valid API key to override the Firecrawl provider'sserver-side fetch target via
provider_options.baseUrl(or the legacy top-levelbaseUrl),with no SSRF validation.
cloud-metadata endpoint) and read the response back through the normal search result shape.
Root cause
buildFirecrawlSearchRequest()(open-sse/handlers/search/firecrawlSearch.ts) used theclient-controlled
baseUrloverride verbatim to build the outbound fetch URL — no SSRF guardwas applied before the fetch. Other search providers (
jinaSearch,perplexitySearch) werechecked and do not accept a client-controlled
baseUrl, so only Firecrawl needed the guard.Fix
Validate the override with the project's existing
parseAndValidatePublicUrloutbound URL guard(
@/shared/network/outboundUrlGuard) before it is used to build the fetch target — same guardalready used elsewhere in the codebase (webhook/provider-validation SSRF guards).
Attribution
Thanks to @zmf963 for the original report.
Test plan
tests/unit/firecrawl-search-ssrf-guard.test.ts— rejects loopback,RFC1918, and cloud-metadata targets via both
provider_options.baseUrland legacytop-level
baseUrl; confirms the default and an explicit public https override still work.node --import tsx/esm --test tests/unit/firecrawl-search-ssrf-guard.test.ts→ 10/10 pass.npx eslint open-sse/handlers/search/firecrawlSearch.ts tests/unit/firecrawl-search-ssrf-guard.test.ts→ clean.