GHSA-F9Q4-FP8J-R5H7
SSRF in the AI Agent (llm.agent) module via unvalidated base_url
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:N
Fuente: GitHub
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-F9Q4-FP8J-R5H7 divulgada · CVSS 7.1 (GitHub) | |
| Remediación | Parche 2.29.0 | flyto-core · 0 d desde divulgación | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
Summary
CVE-2026-67428 (fixed in flyto-core 2.26.7) addressed an SSRF where HTTP-emitting modules fetched caller-controlled URLs without the project's SSRF guard validate_url_with_env_config. Its advisory states the fix covers "the agent and llm inline base_url branch." It does not: the AI Agent module llm/agent.py still fetches a workflow-controlled base_url with no SSRF validation in the current latest release (2.28.1).
The sibling modules llm/chat.py and ai/model.py call validate_url_with_env_config(base_url) and are tagged ssrf_protected; llm/agent.py does not. The only URL-related guard it applies, assert_env_credential_endpoint_allowed, is not an SSRF control (its own docstring: "The SSRF guard is the wrong control here… a caller-supplied key going anywhere is fine") and no-ops entirely when the caller supplies its own api_key. A workflow that provides its own api_key plus a base_url pointing at 169.254.169.254, loopback, or any internal host makes flyto issue an outbound request there.
Affected component
src/core/modules/atomic/llm/agent.py -> src/core/modules/atomic/llm/_chat_models.py. Verified on 2.28.1 (latest). 2.26.7 (the CVE-2026-67428 "fixed" release) is identical in this path.
Root cause
llm/agent.py (model build from inline params):
base_url = params.get('base_url') # workflow-controlled
caller_base_url = base_url
...
assert_env_credential_endpoint_allowed(caller_base_url, key_from_env) # credential guard only; no-ops for caller key
...
return create_chat_model(provider=provider, api_key=api_key, model=..., base_url=base_url)
llm/agent.py never calls validate_url_with_env_config (full-file grep: no validate_url, ssrf, enforce_outbound, or guarded_client_session). create_chat_model (_chat_models.py) performs no validation and fetches via a raw session:
async def _http_post(url, headers, payload):
...
async with aiohttp.ClientSession() as session: # raw, no ssrf_guarded_connector
... # POST to f"{base_url}/chat/completions"
The credential guard explicitly does nothing for a caller-supplied key:
def assert_env_credential_endpoint_allowed(base_url, key_from_env):
if not key_from_env:
return # caller-supplied key: no check at all
...
Impact
SSRF (CWE-918). An authenticated workflow-author points the AI Agent node's base_url at the cloud metadata IP (169.254.169.254), a loopback/RFC1918 host, or any internal service; flyto issues the outbound HTTP POST there. Same impact class as the parent CVE-2026-67428: cloud-metadata credential theft and internal service read/write.
Preconditions
An authenticated workflow-author (or any actor who can supply/influence a recipe with an llm.agent node) sets provider, api_key (any value — this makes key_from_env False so the credential guard is skipped), and base_url. Matches the parent CVE's threat model.
Proof of concept (live-confirmed on installed flyto-core 2.28.1)
Ran the real flyto-core code against a local "internal" listener:
Step 1: assert_env_credential_endpoint_allowed('http://127.0.0.1:9300/v1', key_from_env=False)
-> PASSED (no SSRF block)
Step 2: create_chat_model(provider='openai', api_key='attacker-supplied-key',
model='gpt-4o', base_url='http://127.0.0.1:9300/v1').chat([...])
-> [INTERNAL-TARGET] flyto POSTed to /v1/chat/completions
(Authorization: Bearer attacker-supplied-key)
[+] SSRF CONFIRMED: flyto-core sent the request to the internal target with no SSRF validation.
127.0.0.1:9300 stands in for 169.254.169.254 / any internal host.
Recommended fix
In llm/agent.py, call validate_url_with_env_config(base_url) before create_chat_model (mirroring ai/model.py and llm/chat.py), and/or route _chat_models through ssrf_guarded_connector / guarded_client_session so the connect-time IP is SSRF-validated (also closing DNS rebinding).
Reference
Incomplete fix of CVE-2026-67428 (GHSA-pgwh-4jj4-qm8v), whose advisory names "the agent … base_url branch" as fixed in 2.26.7; the agent branch remains unguarded in 2.28.1. The credential-endpoint guard in llm/agent.py addresses a different issue (GHSA-qq9q-xgm3-xv9g, env-credential leakage) and is not an SSRF control.
---
Maintainer note
Fixed in `2.29.0`. `_resolve_chat_model` now calls `validate_url_with_env_config` on a caller-supplied `base_url` before building the chat model, mirroring `llm.chat` and `ai.model`, and `llm.agent` returns `error_code: 'SSRF_BLOCKED'` like its siblings. The backward-compatible sub-node config dict reaches the same builder and gets the same check, so it is not a way around it.
The report's central point — that `assert_env_credential_endpoint_allowed` is not an SSRF control — was also the reason the project's own registry-wide outbound coverage gate reported this module as guarded: that symbol was in the gate's list of accepted guards. It has been removed from that list. It answers a different question, permits any public host by design, and no-ops entirely for a caller-supplied key, so counting it let a module read as guarded while fetching an unchecked URL.
`GHSA-pp5w-w9c3-qfv2` is an independent report of this same parameter; both are credited and both are fixed by this change.
Regression tests: `tests/core/test_reported_advisories_2026_08_19.py` — `test_llm_agent_inline_base_url_is_ssrf_guarded`, `test_llm_agent_sub_node_config_base_url_is_ssrf_guarded`, `test_llm_agent_reports_ssrf_blocked`.
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.29.0 | 0 d | 2.41.0 no afectada |
2.29.0Arsenal 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-f9q4-fp8j-r5h7Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
