Skip to content

fix(web): re-check Firecrawl final URLs for SSRF (salvage #35840) - #56143

Merged
teknium1 merged 2 commits into
mainfrom
hermes/hermes-e5c82763
Jul 1, 2026
Merged

teknium1 merged 2 commits into
mainfrom
hermes/hermes-e5c82763

Conversation

@teknium1

@teknium1 teknium1 commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator

Summary

Firecrawl's reported final URL (metadata.sourceURL) is now SSRF-checked with is_safe_url() before any scraped content is returned — closing a redirect-based SSRF hole where web_extract validated the input URL but not the post-fetch redirect target (e.g. 169.254.169.254 cloud metadata).

Salvage of #35840 by @zapabob — original commit cherry-picked with authorship preserved.

Changes

  • plugins/web/firecrawl/provider.py: re-run is_safe_url(final_url) right before the existing website-policy re-check; fail-closed, returns an empty blocked result.
  • tests/tools/test_website_policy.py: regression test for a Firecrawl final URL pointing at the cloud metadata endpoint; adapt to current web_extract_tool signature (async_is_safe_url input gate, no use_llm_processing kwarg).

Root cause

The input URL is SSRF-gated at the web_extract_tool entry (async_is_safe_url), but the final-URL path only re-ran check_website_access — not the SSRF guard. A redirect to a private/metadata address slipped past.

Scope

The sibling plugins/browser/firecrawl provider has no redirect/final-URL surface, so no matching site there — the bug class is complete with this one change.

Validation

Result
tests/tools/test_website_policy.py 21/21 passing
New metadata-endpoint final-URL test blocks, content empty

Infographic

Firecrawl Final-URL SSRF Re-check

zapabob and others added 2 commits July 1, 2026 00:38
Follow-up for salvaged PR #35840: current main removed the
use_llm_processing kwarg (LLM summarization dropped) and moved the input
SSRF gate to async_is_safe_url. Adjust the new firecrawl-final-url test
to match.
@teknium1
teknium1 merged commit 2475a55 into main Jul 1, 2026
31 checks passed
@teknium1
teknium1 deleted the hermes/hermes-e5c82763 branch July 1, 2026 07:49
@alt-glitch alt-glitch added type/security Security vulnerability or hardening tool/web Web search and extraction comp/plugins Plugin system and bundled plugins P2 Medium — degraded but workaround exists sweeper:risk-security-boundary Sweeper risk: may affect sandboxing, auth, credentials, or sensitive data labels Jul 1, 2026
@alt-glitch

Copy link
Copy Markdown
Contributor

This was generated by AI during triage.

Salvage (merged) of #35840 by @zapabob, authorship preserved — related, not a duplicate. Adjacent to #55938, which centralizes the website-policy final-URL re-check across all extract providers (not just Firecrawl).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/plugins Plugin system and bundled plugins P2 Medium — degraded but workaround exists sweeper:risk-security-boundary Sweeper risk: may affect sandboxing, auth, credentials, or sensitive data tool/web Web search and extraction type/security Security vulnerability or hardening

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants