Langflow: SSRF in URL-taking components (protection disabled by default / warn-only, not applied to RSS, SearXNG, Web Search, Home Assistant, Glean, Docling) (GHSA-j8f7-x8jm-wmm4) · Sieve
중간취약점
Langflow: SSRF in URL-taking components (protection disabled by default / warn-only, not applied to RSS, SearXNG, Web Search, Home Assistant, Glean, Docling)
# TODO: In next major version (2.0), remove warn_only=True to enforce blocking
validate_url_for_ssrf(url, warn_only=True)
with ssrf_protection_enabled: bool = False in the settings.
Clarifications on the original report. Some sinks in the report are not exploitable SSRF:
web_search.py: the DuckDuckGo search request and the Google News RSS request, and news_search.py:131. The host is hard-coded (html.duckduckgo.com / news.google.com) and user input only goes into quote_plus-encoded path and query segments, so the destination cannot be redirected. The real Web Search sink was fetching the result URLs, which is fixed in #14071.
langflow/load/utils.pyget_flow(): this is a client-side SDK helper (from langflow.load import get_flow) that the caller runs against their own Langflow URL. No API route calls it, so it is not a backend SSRF endpoint.
PoC (vulnerable versions)
Log in as any user who can create flows.
Add an RSS Reader (or SearXNG / Home Assistant / Glean / Docling Serve) component and set its URL to http://169.254.169.254/latest/meta-data/ (or an internal host such as http://10.0.0.1/).
Run the component. The Langflow server issues the request, and the response or error is shown in the component output.
On patched versions the same run fails with SSRFProtectionError: Access to IP address 169.254.169.254 is blocked by SSRF protection.
Impact
Access to cloud instance metadata (IAM credentials / tokens) on AWS, GCP and Azure deployments.
Probing and interaction with internal services and private networks reachable from the Langflow host.
Requires an authenticated account with permission to build or run flows. Deployments where every user is already fully trusted are less affected.
Fix
#13016: sets ssrf_protection_enabled = True by default, changes warn_only to default False, drops warn_only=True from API Request, and adds validate_and_resolve_url() plus SSRFProtectedTransport (DNS pinning).
#13643: adds lfx.utils.ssrf_httpx (ssrf_safe_httpx_get/post, protected client kwargs) and applies it to Home Assistant, Glean and the model-provider base-URL components.
#14033: Docling Serve builds its httpx.Client with ssrf_protected_httpx_client_kwargs_for_url(base_url).
#14071 (release-1.10.3) / #14073 (forward-port to 1.11.0): Web Search validates and pins each result URL before fetching it, with redirects disabled.
Note: connector-style components (for example Home Assistant, Ollama, LM Studio) keep a documented loopback exemption (#14146), so a self-hosted user can reach a local service on localhost. Private-network and metadata addresses stay blocked. Operators can tighten or relax this with LANGFLOW_SSRF_ALLOWED_HOSTS and LANGFLOW_CONNECTOR_SSRF_VALIDATION_ENABLED.
Do not set LANGFLOW_SSRF_PROTECTION_ENABLED=false. If you need to reach internal hosts on purpose, allowlist only those hosts with LANGFLOW_SSRF_ALLOWED_HOSTS.
On versions that cannot be upgraded right away, restrict outbound network access from the Langflow host (for example, block 169.254.169.254 and use IMDSv2 on AWS).