GHSA-j8f7-x8jm-wmm4
Langflow: SSRF in URL-taking components (protection disabled by default / warn-only, not applied to RSS, SearXNG, Web Search, Home Assistant, Glean, Docling)
- Severity
- 0.0 / 10
- Medium · CVSS 4.0
- Exploit chance (EPSS)
- —
- No score published
- Known exploited
- No
- Not in CISA's catalog
- Weakness
- CWE-918 Server-Side Request Forgery (SSRF)
- Fix
- Available
- 4 packages have a fixed version
Description
Summary
Before Langflow 1.10.3, several built-in components sent server-side HTTP requests to URLs the flow author controls, with no SSRF enforcement. An authenticated user who can build or run flows could make the Langflow server reach loopback, RFC 1918 / private networks, link-local addresses and cloud metadata endpoints (for example http://169.254.169.254/latest/meta-data/), and in many cases read the response back through the component output.
Two things combined to cause this:
- Protection disabled / warn-only. The SSRF guard (
lfx/utils/ssrf_protection.py, added in 1.7.0 by #10544) shipped withssrf_protection_enabled = False, and its only caller, the API Request component, calledvalidate_url_for_ssrf(url, warn_only=True). So even with protection turned on, blocked URLs were only logged. - Inconsistent coverage. Other components that take a user-supplied URL or base URL did not call the guard at all: RSS Reader, SearXNG, Web Search (fetching result / RSS URLs), Home Assistant, Glean Search and Docling Serve (remote).
The problem was fixed across several PRs and is fully fixed in Langflow 1.10.3 (and 1.11.0+). With the default settings, outbound requests from these components are now validated after DNS resolution, pinned to the validated IP (to prevent DNS rebinding) and blocked when they target private, loopback, link-local or metadata addresses, unless the operator allowlists the host.
Affected versions
| Package (PyPI) | Vulnerable | Patched |
|---|---|---|
langflow |
< 1.10.3 |
1.10.3 |
langflow-base |
< 0.10.3 |
0.10.3 |
lfx |
< 1.10.3 |
1.10.3 |
lfx-docling (Docling Serve component) |
< 0.1.2 |
0.1.2 |
How the fix rolled out:
| Release | Change |
|---|---|
< 1.7.0 |
No SSRF guard. All URL-taking components make unrestricted requests. |
1.7.0 – 1.9.2 |
Guard exists, but ssrf_protection_enabled=False by default and API Request uses warn_only=True. |
1.9.3 |
#13016: protection on by default, API Request blocks (DNS pinning / anti-rebinding). Other components still unprotected. |
1.10.1 |
#13395 (RSS Reader, SearXNG) and #13643 (Home Assistant, Glean, plus model-provider URL components) route requests through SSRF-safe helpers. |
1.10.3 |
#14033 (Docling Serve) and #14071 (Web Search result/RSS fetching). All components cited in this report are protected. |
Details
Vulnerable pattern (for example rss.py before #13395):
response = requests.get(self.rss_url, timeout=self.timeout)
API Request before #13016:
# 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, andnews_search.py:131. The host is hard-coded (html.duckduckgo.com/news.google.com) and user input only goes intoquote_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 ashttp://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 = Trueby default, changeswarn_onlyto defaultFalse, dropswarn_only=Truefrom API Request, and addsvalidate_and_resolve_url()plusSSRFProtectedTransport(DNS pinning).- ssrf_protection_enabled: bool = False + ssrf_protection_enabled: bool = True -
#13395: adds
lfx.utils.ssrf_requests.ssrf_safe_get(per-hop validation and pinning forrequests) and uses it in RSS Reader and SearXNG.- response = requests.get(self.rss_url, timeout=self.timeout) + response = ssrf_safe_get(self.rss_url, timeout=self.timeout) -
#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.Clientwithssrf_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.
Remediation
- Upgrade to
langflow >= 1.10.3(orlangflow-base >= 0.10.3/lfx >= 1.10.3/lfx-docling >= 0.1.2). - Do not set
LANGFLOW_SSRF_PROTECTION_ENABLED=false. If you need to reach internal hosts on purpose, allowlist only those hosts withLANGFLOW_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.254and use IMDSv2 on AWS).
Affected versions
PyPI
| Package | Vulnerable | Fixed in |
|---|---|---|
| langflow | < 1.10.3 |
1.10.3 |
| langflow-base | < 0.10.3 |
0.10.3 |
| lfx | < 1.10.3 |
1.10.3 |
| lfx-docling | < 0.1.2 |
0.1.2 |
How to fix
Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.
langflow PyPI → 1.10.3
- pip
pip install --upgrade "langflow>=1.10.3"- poetry
poetry add "langflow>=1.10.3"- uv
uv add "langflow>=1.10.3"
langflow-base PyPI → 0.10.3
- pip
pip install --upgrade "langflow-base>=0.10.3"- poetry
poetry add "langflow-base>=0.10.3"- uv
uv add "langflow-base>=0.10.3"
lfx PyPI → 1.10.3
- pip
pip install --upgrade "lfx>=1.10.3"- poetry
poetry add "lfx>=1.10.3"- uv
uv add "lfx>=1.10.3"
lfx-docling PyPI → 0.1.2
- pip
pip install --upgrade "lfx-docling>=0.1.2"- poetry
poetry add "lfx-docling>=0.1.2"- uv
uv add "lfx-docling>=0.1.2"
Severity breakdown
CVSS 4.0 0.0
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:N/VA:N/SC:H/SI:L/SA:N
- Attack vector
- Network
- Attack complexity
- Low
- Attack requirements
- None
- Privileges required
- Low
- User interaction
- None
- Confidentiality (vulnerable system)
- None
- Integrity (vulnerable system)
- None
- Availability (vulnerable system)
- None
- Confidentiality (subsequent systems)
- High
- Integrity (subsequent systems)
- Low
- Availability (subsequent systems)
- None
Weakness
CWE-918: Server-Side Request Forgery (SSRF)
The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination.
References
Packages
Other links
- github.com/langflow-ai/langflow/security/advisories/GHSA-j8f7-x8jm-wmm4
- github.com/langflow-ai/langflow/pull/13016
- github.com/langflow-ai/langflow/pull/13395
- github.com/langflow-ai/langflow/pull/13643
- github.com/langflow-ai/langflow/pull/14033
- github.com/langflow-ai/langflow/pull/14071
- github.com/langflow-ai/langflow/commit/94859df33acd70b2a1f816e26d68f5e89a7e5639
- github.com/langflow-ai/langflow/releases/tag/v1.10.3
Timeline
- Published
- Last updated by the source
Related advisories
| Advisory | Severity | Why it's related |
|---|---|---|
| GHSA-qrpv-q767-xqq2 Langflow: IDOR Vulnerability in `/api/v1/responses` Endpoint Allows Authenticated Attackers to Access Another User's Flow | High Known exploited | Also affects langflow |
| GHSA-vwmf-pq79-vjvx Unauthenticated Remote Code Execution in Langflow via Public Flow Build Endpoint | Critical Known exploited | Also affects langflow |
| GHSA-g22f-v6f7-2hrh Langflow affected by Remote Code Execution via validate_code() exec() | High Known exploited | Also affects langflow |
| GHSA-577h-p2hh-v4mv Langflow CORS misconfiguration enables Account Takeover and RCE | Critical Known exploited | Also affects langflow |
| GHSA-rvqx-wpfh-mfx7 Langflow Unauth RCE | Critical Known exploited | Also affects langflow |
| GHSA-4f6c-2vvp-gw82 Langflow: IP Spoofing Bypass via `X-Forwarded-For` Allowing Remote Configuration Write | High | Also affects langflow |
| GHSA-4hmc-cfm3-w43c Langflow has Authenticated Cross-Project File Disclosure via Unscoped MCP Resource Handlers | High | Also affects langflow |
| GHSA-gh98-4phw-6fmw Langflow : Cross-user flow access and vertex execution via deprecated /api/v1/build/{flow_id}/vertices endpoints | Medium | Also affects langflow |
MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.
Check your repos with MergeHarbor