Langflow vulnerable to Server-Side Request Forgery
High7.7CVE-2025-68477 · Published Dec 19, 2025 · updated Jul 7, 2026
Affected versions
| Package | Affected | Fixed in |
|---|---|---|
| langflow PyPI | < 1.7.1 | 1.7.1 |
Details and references
**Vulnerability Overview** Langflow provides an API Request component that can issue arbitrary HTTP requests within a flow. This component takes a user-supplied URL, performs only normalization and basic format checks, and then sends the request using a server-side httpx client. It does not block private IP ranges (127.0.0.1, the 10/172/192 ranges) or cloud metadata endpoints (169.254.169.254), and it returns the response body as the result. Because the flow execution endpoints (/api/v1/run, /api/v1/run/advanced) can be invoked with just an API key, if an attacker can control the API Request URL in a flow, non-blind SSRF is possible, accessing internal resources from the server’s network context. This enables requests to, and collection of responses from, internal administrative endpoints, metadata services, and internal databases/services, leading to information disclosure and providing a foothold for further attacks. **Vulnerable Code** 1. When a flow runs, the API Request URL is set via user input or tweaks, or it falls back to the value stored in the node UI. https://github.com/langflow-ai/langflow/blob/fa21c4e5f11a697431ef471d63ff70d20c05c6dd/src/backend/base/langflow/api/v1/endpoints.py#L349-L359 ```python @router.post("/run/{flow_id_or_name}", response_model=None, response_model_exclude_none=True) async def simplified_run_flow( *, background_tasks: BackgroundTasks, flow: Annotated[FlowRead | None, Depends(get_flow_by_id_or_endpoint_name)], input_request: SimplifiedAPIRequest | None = None, stream: bool = False, api_key_user: Annotated[UserRead, Depends(api_key_security)], context: dict | None = None, http_request: Request, ): ``` https://github.com/langflow-ai/langflow/blob/fa21c4e5f11a697431ef471d63ff70d20c05c6dd/src/backend/base/langflow/api/v1/endpoints.py#L573-L588 ```bash @router.post( "/run/advanced/{flow_id_or_name}", response_model=RunResponse, response_model_exclude_none=True, ) async def experimental_run_flow( *, session: DbSession, flow: Annotated[Flow, Depends(get_flow_by_id_or_endpoint_name)], inputs: list[InputValueRequest] | None = None, outputs: list[str] | None = None, tweaks: Annotated[Tweaks | None, Body(embed=True)] = None, stream: Annotated[bool, Body(embed=True)] = False, session_id: Annotated[None | str, Body(embed=True)] = None, api_key_user: Annotated[UserRead, Depends(api_key_security)], ) -> RunResponse: ``` 2. Normalization/validation stage: It only checks that the URL is non-empty and well-formed. No blocking of private networks, localhost, or IMDS. https://github.com/langflow-ai/langflow/blob/fa21c4e5f11a697431ef471d63ff70d20c05c6dd/src/lfx/src/lfx/components/data/api_request.py#L280-L289 ```python def _normalize_url(self, url: str) -> str: """Normalize URL by adding https:// if no protocol is specified.""" if not url or not isinstance(url, str): msg = "URL cannot be empty" raise ValueError(msg) url = url.strip() if url.startswith(("http://", "https://")): return url return f"https://{url}" ``` https://github.com/langflow-ai/langflow/blob/fa21c4e5f11a697431ef471d63ff70d20c05c6dd/src/lfx/src/lfx/components/data/api_request.py#L433-L438 ```python url = self._normalize_url(url) # Validate URL if not validators.url(url): msg = f"Invalid URL provided: {url}" raise ValueError(msg) ``` 3. On the server side, it sends a request to an arbitrary URL using httpx.AsyncClient and exposes the response body as metadata["result"]. https://github.com/langflow-ai/langflow/blob/fa21c4e5f11a697431ef471d63ff70d20c05c6dd/src/l
- CVSS 3.1
- CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N
- Severity from
- GitHub (reviewed advisory)
- Weakness
- CWE-918
- Also known as
- CVE-2025-68477, PYSEC-2026-1522
More Langflow advisories
All Langflow| Date | Advisory | Severity | Fixed in |
|---|---|---|---|
| Dec 192025 | External Control of File Name or Path in Langflow CVE-2025-68478High7.1fixed in 1.7.1 | High7.1 | 1.7.1 |
| Dec 62025 | Langflow CORS misconfiguration enables Account Takeover and RCE CVE-2025-34291Critical8.8fixed in 1.7.0 | Critical8.8 | 1.7.0 |
| Jan 2 | Langflow Missing Authentication on Critical API Endpoints CVE-2026-21445Highfixed in 1.7.1 | High | 1.7.1 |
| Jan 23 | Langflow affected by Remote Code Execution via validate_code() exec() CVE-2026-0770Highno fix yet | High | No fix yet |
| Feb 27 | Langflow has Remote Code Execution in CSV Agent CVE-2026-27966Critical9.8no fix yet | Critical9.8 | No fix yet |
| Mar 17 | Unauthenticated Remote Code Execution in Langflow via Public Flow Build Endpoint CVE-2026-33017Critical9.8fixed in 1.9.0 | Critical9.8 | 1.9.0 |