llamaCVEVulnerability Intelligence
/
Advisory · GitHub · PyPI · flyto-core

GHSA-F9Q4-FP8J-R5H7

SSRF in the AI Agent (llm.agent) module via unvalidated base_url

Parche disponible
Descargar PNG JSON
CVSS 3.1
7.1
Alta
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:N Fuente: GitHub
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
Parche1 versiónPrimer parche el mismo día de la divulgación
Exposición88 dDesde la divulgación, 23 ago 2026, 9:23 a. m.
Detección87 dDesde la divulgación hasta su ingreso al índice
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada
Explotación
Remediación
Parche 2.29.0
Monitoreo
Detectada +1
23 ago 26
18 nov 26
20 nov 26
23 ago 26
14 sept 26
6 oct 26
29 oct 26
20 nov 26
FechaFaseEventoDetalle
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
Resumen
Descripción del advisory
Texto original · GitHub · en inglés

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.

Vector CVSS 3.1

Desglose de métricas

Opción resaltada = valor del vector · izquierda = peor caso · GitHub
Vector de ataqueAV:N
RedAdyacenteLocalFísica
ComplejidadAC:L
BajaAlta
PrivilegiosPR:L
NingunoBajosAltos
InteracciónUI:N
NingunaRequerida
AlcanceS:U
CambiadoSin cambio
ConfidencialidadC:H
AltoBajoNinguno
IntegridadI:L
AltoBajoNinguno
DisponibilidadA:N
AltoBajoNinguno
Versiones

Rangos afectados

Afectada Corregida Última
flyto-core≤ 2.28.1
2.28.1
2.41.0
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
pypiflyto-core
Corregida 2.29.0 0 d 2.41.0 no afectada
Versiones corregidas2.29.0
Explotación

Arsenal público

Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.

Referencias
Advisoryhttps://github.com/flytohub/flyto-core/security/advisories/GHSA-f9q4-fp8j-r5h7

Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.