GHSA-H8XC-824Q-PWFH
SSRF in agent.chain/agent.autonomous via unvalidated ollama_url parameter
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N
Fuente: GitHub
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-H8XC-824Q-PWFH divulgada · CVSS 6.4 (GitHub) | |
| Remediación | Parche 2.26.11 | flyto-core · 0 d desde divulgación | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
## Summary
When `llm_provider='ollama'`, the `agent.chain` and `agent.autonomous` modules POST to a caller-supplied `ollama_url` through `LLMClientMixin._call_ollama` with no SSRF validation. This is a distinct parameter and code path from the `base_url` branch already covered by advisory pgwh, and it is sharply asymmetric to the dedicated `ai.local_ollama.chat` module which enforces a localhost allowlist and a `FLYTO_ALLOW_REMOTE_OLLAMA` opt-in for the same operation.
## Root Cause
`src/core/modules/third_party/ai/agents/llm_client.py:212-214` issues `aiohttp.ClientSession().post(f"{self.ollama_url}/api/chat", json=payload)` with zero validation. `grep enforce_outbound_url|validate_url|guarded_*` in llm_client.py = 0; `0a0a528` never touched it. `ollama_url` is a caller parameter on `agent.chain` (chain.py:90) and `agent.autonomous` (autonomous.py). By contrast, `ai.local_ollama.chat` enforces a localhost allowlist + `FLYTO_ALLOW_REMOTE_OLLAMA` gate (local_ollama.py:186-199) AND requires the dangerous `shell.execute` permission; the agent mixin has no guard and needs only the non-dangerous `ai.api` permission.
## Impact
Authenticated (PR:L) blind/partial POST SSRF to any host:port (non-200 response body is surfaced in the raised RuntimeError at llm_client.py:219). Scope Changed (module sandbox → internal network). C:L (blind), I:L.
## Proof of Concept
`agent.autonomous {"goal":"x", "llm_provider":"ollama", "ollama_url":"http://169.254.169.254:80"}` (or `http://127.0.0.1:<internal-port>`) → the server issues the POST; error paths reflect partial response content.
## Attack Chain
1. Entry: authed execute_module `agent.autonomous {goal:"x", llm_provider:"ollama", ollama_url:"http://127.0.0.1:6379"}` (or `169.254.169.254`).
Guard: none. Bypass proof: `grep validate_url|enforce_outbound|guarded|localhost` in chain.py/autonomous.py/llm_client.py = 0 (only an inert `ssrf_protected` tag at chain.py:27).
2. Sink: `aiohttp.ClientSession().post(f"{ollama_url}/api/chat", json=payload)` at llm_client.py:213-214.
3. Impact: blind/partial POST SSRF (non-200 body surfaced in RuntimeError at :219) to any host:port.
## Bypass Evidence
`ai.local_ollama` raises "SSRF blocked: ollama_url must be localhost" for the same input; the `LLMClientMixin._call_ollama` path has no such check (grep = 0). The guarded twin proves the intended control, which this path is missing.
## Affected Versions
`flyto-core <= 2.26.10` (sink present on the v2.26.10 release tag).
## Suggested Fix
Apply the same localhost allowlist + `FLYTO_ALLOW_REMOTE_OLLAMA` opt-in (or `enforce_outbound_url`) used by `ai.local_ollama.chat` to `LLMClientMixin._call_ollama` before the request.
---
Reported by zx (Jace) — GitHub: @manus-use
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 |
|---|---|---|---|---|
pypiflyto-core |
Corregida | 2.26.11 | 0 d | 2.41.0 no afectada |
2.26.11Arsenal público
Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.
https://github.com/flytohub/flyto-core/security/advisories/GHSA-h8xc-824q-pwfhLas referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
