GHSA-QVQP-MXH4-F27W
Langflow URL component: unbounded response size allows denial of service via memory exhaustion
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
Fuente: GitHub
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Remediación | Parche 1.13.0 | langflow · -14 d desde divulgación | |
| Divulgación | Publicada | GHSA-QVQP-MXH4-F27W divulgada · CVSS 6.5 (GitHub) | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
Summary
The URL component (`URLComponent`) downloaded the whole HTTP response into memory with no limit on its size. A URL that serves a very large (or never-ending) body makes the Langflow process use more and more memory until it is killed by the OS (out of memory), which takes down the Langflow instance and can make the whole host unresponsive.
The URL component's `urls` input supports tool mode, so when it is attached as a tool to an Agent, the URL comes from the chat message. Anyone who can send a message to such a flow (Playground, a public/shared flow, or the `/api/v1/run` endpoint) can trigger the download just by asking for it, for example: `Help me download http://attacker.example/big.html`.
The issue is fixed in Langflow 1.13.0 (#15436).
Affected versions
| Package (PyPI) | Vulnerable | Patched |
|---|---|---|
| `langflow` | `>= 1.0.0a0, < 1.13.0` | `1.13.0` |
| `langflow-base` | `< 1.13.0` | `1.13.0` |
| `lfx` | `< 1.13.0` | `1.13.0` |
The URL component was introduced with Langflow 1.0 (first published in `langflow-base` 0.0.13 / `langflow` 1.0.0a0) and has been unbounded in every release since:
| Release | Implementation |
|---|---|
| `1.0.0a0` – `1.9.x` | LangChain loaders (`WebBaseLoader` in 1.0, later `RecursiveUrlLoader`) — the full response is read with no size limit. The reporter's PoC is against 1.4.3. |
| `1.10.0` – `1.12.x` | `httpx` implementation (`lfx.components.data_source.url`) — `client.get()` + `response.text` buffer the full body. |
| `1.13.0`+ | Bounded, streamed reads (see Fix). Fixed. |
The SSRF hardening added between 1.9 and 1.12 (#11996, #13488, #13572, #15171) is unrelated to this issue and does not fix it. It blocks requests to private/internal addresses, which stops the reporter's exact PoC target (`10.176.36.39`), but it does not limit response size. A public, attacker-controlled host still triggers the issue with SSRF protection enabled (the default).
Details
Before 1.13.0, `src/lfx/src/lfx/components/data_source/url.py` had several ways to exhaust memory:
- Huge or endless body. Pages were fetched with `client.get(...)` (no streaming), so `httpx` read the entire body into memory before returning, and `Content-Length` was never checked. `_process_response` then decoded it (`response.text`, another copy). The body was also parsed with BeautifulSoup/lxml up to three times: metadata, the Text/Markdown extractor, and link extraction. Each parse builds a DOM several times larger than the raw bytes.
- Huge body on a redirect response. With SSRF protection on, the per-hop redirect loop called `client.get(..., follow_redirects=False)`, which read every 3xx body. With SSRF protection off, `httpx` auto-follow calls `await response.aread()` on every redirect hop.
- Compression bombs. `httpx` advertises `Accept-Encoding: gzip, deflate, br, zstd` and decodes each network chunk with no output limit. A ~1.7 KB brotli body expands to 1 GB.
- Crawl fan-out. `max_depth` goes up to 5, so one page can link to thousands of same-domain pages, each fetched and kept in memory.
The `timeout` input (an `IntInput` with no upper bound, e.g. `10000000` in the PoC) let the transfer run long enough to deliver an arbitrarily large body.
Measured on a local server (peak RSS increase during one fetch, before the fix): a 300 MB page added about 790 MB; a 302 carrying 300 MB before redirecting to a small page added about 360 MB; a 1,681-byte brotli body passed 2 GB and was still growing when stopped. The reporter saw Langflow reach 100 GB of RAM.
PoC
- Host a URL that returns a very large HTML body (several GB, or an endless chunked stream). With SSRF protection enabled (the default), it must be a public address.
- Create a flow: Chat Input → Agent, with the URL component connected to the Agent as a tool. In the URL component's advanced settings, set Timeout to `10000000`.
- In the Playground, send: `Help me download http://<host>/big.html`
- The Langflow process's memory grows until the process is killed or the host runs out of memory.
The same thing happens without an Agent by putting the URL directly in the component and running the flow.
Impact
Denial of service through unbounded memory use (CWE-400 / CWE-770). Any user who can run a flow containing the URL component, or send chat input to a flow that exposes it as an Agent tool, can crash the Langflow instance for all users. On shared hosts, other services can be affected too. Confidentiality and integrity are not affected.
Fix
Fixed in Langflow 1.13.0 by #15436 (`lfx.components.data_source.url`):
- Bounded, streamed reads. Response bodies are streamed and rejected once they exceed a per-response limit, checked on both the encoded (on-the-wire) and decoded size. An oversized `Content-Length` is rejected before any body is read.
- Shared budget per fetch. All URLs and crawled pages of one fetch share a total byte budget. Each response is charged the larger of its encoded and decoded sizes, including rejected responses, and the crawl stops once the budget is spent.
- Configurable limits. `LANGFLOW_URL_COMPONENT_MAX_RESPONSE_BYTES` (default 10 MiB) and `LANGFLOW_URL_COMPONENT_MAX_TOTAL_BYTES` (default 100 MiB). Both must be positive integers.
- Redirect bodies are never read. The pinned per-hop loop streams each hop. The unpinned path follows the `next_request` that httpx builds for each hop instead of auto-follow, keeping the same cookies, header handling and 20-redirect cap.
- Bounded decompression. Only `gzip, deflate` is advertised. `br`, `zstd` and stacked encodings are rejected. gzip/deflate are decoded by the component itself with an output limit per chunk (`zlib.decompressobj().decompress(data, max_length)`). Incomplete streams, trailing data and invalid compressed data are rejected.
Oversized or invalid responses follow the component's existing error handling: with Continue on Failure on, the page is skipped with a warning; otherwise the run fails with `Error loading documents ...`.
Workarounds (if you cannot upgrade)
- Do not expose flows that use the URL component (directly or as an Agent tool) to untrusted users. Avoid making them public or shared.
- Run Langflow with a container/cgroup memory limit, so the worst case is a restart of the Langflow container rather than the whole host running out of memory.
- Where possible, restrict outbound HTTP from the Langflow host with an egress proxy that enforces a maximum response size.
References
- Fix: https://github.com/langflow-ai/langflow/pull/15436 (1.13.0)
- Reporter's write-up and PoC: https://rumbling-iguanadon-b74.notion.site/DoS-in-Langflow-URL-Component-21e31dfe268f80cfa428f0c311ad1498
- URL component response size limits: https://docs.langflow.org/url
Incluye detalles técnicos publicados por el investigador. Úselos solo para validar y corregir sus propios sistemas.
Desglose de métricas
Rangos afectados
Estado del parche por paquete
| Paquete / producto | Estado | Corregida en | Desde divulgación | Última versión |
|---|---|---|---|---|
pypilangflow |
Corregida | 1.13.0 | -14 d | 1.13.2 no afectada |
pypilangflow-base |
Corregida | 1.13.0 | -14 d | 1.13.2 no afectada |
pypilfx |
Corregida | 1.13.0 | -14 d | 1.13.2 no afectada |
1.13.0Arsenal público
Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.
https://github.com/langflow-ai/langflow/security/advisories/GHSA-qvqp-mxh4-f27wLas referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
