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

GHSA-HC4C-6X9G-5FQ3

SSRF guard bypass via Teredo IPv6 transition addresses: _extract_embedded_ipv4 never decodes 2001:0000::/32

Parche disponible
Descargar PNG JSON
CVSS 3.1
5.3
Media
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:N/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ón51 dDesde la divulgación, 30 sept 2026, 8:11 a. m.
Detección49 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.33.0
Monitoreo
Detectada +1
30 sept 26
18 nov 26
21 nov 26
30 sept 26
13 oct 26
26 oct 26
8 nov 26
21 nov 26
FechaFaseEventoDetalle
Divulgación Publicada GHSA-HC4C-6X9G-5FQ3 divulgada · CVSS 5.3 (GitHub)
Remediación Parche 2.33.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

flyto-core's SSRF protection normalizes IPv6 transition addresses before range checking, but the helper that unwraps an embedded IPv4 target (`_extract_embedded_ipv4` in `src/core/utils.py`) handles only five of the six standard IPv6 transition forms. Teredo addresses (`2001:0000::/32`) are never decoded, so a URL whose host is a Teredo encoding of a private or cloud-metadata IPv4 (for example the Teredo form of `169.254.169.254`) passes every SSRF guard. A workflow author who can reach the Execution API can drive an authenticated outbound request past the guard that is specifically meant to keep workflow-authored URLs away from internal and metadata endpoints. This is a residual gap in the fix shipped for GHSA-794r-5rp2-fpg8 (CVE-2026-55787).

Root Cause

The SSRF guard enforces its invariant by resolving the host and testing the resulting address against a hardcoded `PRIVATE_IP_RANGES` list, plus unwrapping IPv6 transition forms to range-check the embedded IPv4 as well. The fix for CVE-2026-55787 added `_extract_embedded_ipv4` to unwrap IPv4-mapped (`::ffff:a.b.c.d`), IPv4-compatible (`::a.b.c.d`), 6to4 (`2002::/16`), and NAT64 (`64:ff9b::/96` and `64:ff9b:1::/48`) forms. It never queries the sixth standard transition form, Teredo. Python's own `ipaddress` module exposes `IPv6Address.teredo` and classifies a Teredo address embedding a private target as `is_private == True`, but the guard does not use that predicate and `PRIVATE_IP_RANGES` contains no `2001:0000::/32` entry. As a result `_extract_embedded_ipv4` returns `None` for a Teredo address, `is_private_ip` and `_is_metadata_ip` both see only the outer IPv6 form (which matches no private range), and the request is allowed. Every guard in the SSRF chain, including the connect-time `_SSRFGuardedResolver` and the redirect revalidation path, depends on this same helper and inherits the gap.

src/core/utils.py
  _extract_embedded_ipv4  (around line 364): decodes ipv4_mapped, sixtofour, NAT64, IPv4-compatible; never decodes Teredo (2001:0000::/32) and never calls ip.teredo.
  is_private_ip           (around line 389): relies on _extract_embedded_ipv4 for IPv6 transition unwrapping; PRIVATE_IP_RANGES has no 2001:0000::/32 entry.
  _is_metadata_ip         (around line 424): same _extract_embedded_ipv4 dependency; does not recognize Teredo-encoded metadata IPs.

Impact

A caller who can author or execute a workflow (the product's normal untrusted-input surface, reachable over the bearer-token authenticated Execution API or a workflow node) can submit a Teredo-form host and bypass the SSRF guard. The response body is returned to the caller, so this is a read SSRF against internal and cloud-metadata destinations that the guard is meant to block. Where a Teredo-encoded metadata address is reachable, the plausible consequence is theft of cloud instance credentials from the metadata service. Practical exploitation requires that the host actually route Teredo traffic, which is not the case on a default Linux or container deployment (no Teredo tunnel is present) and is realistic mainly on hosts with a Teredo client such as miredo on Linux or native Teredo on Windows. The guard-logic gap itself is unconditional: the SSRF control fails to recognize a standard IPv6 transition representation of a private or metadata target on every supported runtime.

Proof of Concept

Exercises the shipped guard logic in src/core/utils.py against a Teredo address
that encodes the cloud metadata service 169.254.169.254. No network egress is
required to demonstrate the guard gap; the guard decision is the vulnerability.
import ipaddress
from core.utils import _extract_embedded_ipv4, is_private_ip, _is_metadata_ip

teredo = "2001:0:4136:e378:8000:ffff:5601:5601"   # Teredo encoding of 169.254.169.254
ip = ipaddress.ip_address(teredo)

print("stdlib .teredo       :", ip.teredo)          # (65.54.227.120, 169.254.169.254)
print("stdlib .is_private   :", ip.is_private)      # True
print("_extract_embedded_ipv4:", _extract_embedded_ipv4(ip))  # None  <-- gap
print("is_private_ip        :", is_private_ip(teredo))        # False <-- bypass
print("_is_metadata_ip      :", _is_metadata_ip(teredo))      # False <-- bypass

control = "::ffff:169.254.169.254"                  # IPv4-mapped form, correctly blocked
print("control is_private_ip:", is_private_ip(control))       # True
stdlib .teredo       : (IPv4Address('65.54.227.120'), IPv4Address('169.254.169.254'))
stdlib .is_private   : True
_extract_embedded_ipv4: None
is_private_ip        : False
_is_metadata_ip      : False
control is_private_ip: True

Attack Chain

  1. Exposure: A workflow author reaches the bearer-token authenticated Execution API and submits a module-execute request for an outbound HTTP module (for example `http.get`) with a `url` parameter.
  2. Control: The attacker fully controls the `url` value; the host is set to a Teredo literal such as `http://[2001:0:4136:e378:8000:ffff:5601:5601]/latest/meta-data/`, which survives URL parsing intact.
  3. Path: The value flows into `validate_url_with_env_config`, which passes the scheme check, the metadata-hostname check, `_is_metadata_ip`, DNS resolution of the literal, and `is_private_ip`; the connect-time `_SSRFGuardedResolver` re-checks the same address.
  4. Guard: At every check the address is unwrapped by `_extract_embedded_ipv4`, which returns `None` for Teredo, so the embedded `169.254.169.254` is never range-checked and no `SSRFError` is raised.
  5. Primitive: The outbound client connects to the Teredo host; on a Teredo-routing host the kernel decapsulates to the embedded IPv4 endpoint.
  6. Result: The workflow author obtains a read SSRF to internal or metadata destinations that the guard is meant to block, with the response body returned to the caller.

Bypass Evidence

The relevant guard is the CVE-2026-55787 fix: `_extract_embedded_ipv4` plus the `PRIVATE_IP_RANGES` membership test. The finding is an incomplete fix of that guard. The prior canonical advisory is GHSA-794r-5rp2-fpg8, published and fixed in 2.26.3, which added `_extract_embedded_ipv4` covering IPv4-mapped, IPv4-compatible, 6to4, and NAT64 forms only. The precise new evidence is that Teredo, the sixth standard IPv6 transition form, is not decoded: the runtime output above shows `_extract_embedded_ipv4` returning `None` and `is_private_ip` returning `False` for a Teredo address that Python's own `ipaddress` module classifies `is_private == True`, while the IPv4-mapped control for the same target is correctly blocked. Attempts to disprove the finding were made and failed: the stdlib `is_private` predicate would catch it but the code deliberately uses explicit range membership and never calls it; no `PRIVATE_IP_RANGES` entry covers `2001:0000::/32`; no alternate guard (`BLOCKED_HOSTNAMES`, `METADATA_HOSTNAMES`, `METADATA_IPS`, the connect-time resolver, or redirect revalidation) catches the Teredo form because all of them route through the same helper; and a source-tree search finds no Teredo handling anywhere and no test covering it. The only mitigating factor is network routing, which is captured as an attacker-independent precondition rather than a guard.

Affected Versions

  • `Ecosystem: pip`
  • `Package: flyto-core`
  • `Confirmed affected range: >= 2.26.3, <= 2.32.1`
  • `Latest release checked: 2.32.1 (PyPI)`
  • `Fix status: not fixed`

The gap was introduced together with the CVE-2026-55787 fix in 2.26.3, when `_extract_embedded_ipv4` was added without Teredo coverage. Versions at or below 2.26.2 lack the helper entirely and instead carry the original CVE, so they are not part of this incomplete-fix range. The gap persists through the latest published release, 2.32.1, and no fix exists on any branch.

Suggested Fix

Enforce the invariant that every IPv6 transition representation of a private, loopback, link-local, or metadata IPv4 target is treated as private. Extend `_extract_embedded_ipv4` to decode Teredo addresses (query `ip.teredo` or match the `2001:0000::/32` prefix and extract the embedded client IPv4), then range-check the embedded IPv4 exactly as the other transition forms are checked. The remediation must cover both the pre-request path (`is_private_ip`, `_is_metadata_ip`, `validate_url_ssrf`) and the connect-time `_SSRFGuardedResolver`, and should re-check the embedded IPv4 rather than blanket-blocking the prefix so that legitimate public destinations expressed in transition form remain allowed. As an interim mitigation, operators can restrict outbound destinations with an explicit allowlist, or block IPv6 or Teredo routing at the network layer for the runner host.

Reported by zx (GitHub: @manus-pi).

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:U
CambiadoSin cambio
ConfidencialidadC:H
AltoBajoNinguno
IntegridadI:N
AltoBajoNinguno
DisponibilidadA:N
AltoBajoNinguno
Versiones

Rangos afectados

Afectada Corregida Última
flyto-core≥ 2.26.3 < 2.33.0
2.26.3
2.33.0
2.41.0
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
pypiflyto-core
Corregida 2.33.0 0 d 2.41.0 no afectada
Versiones corregidas2.33.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-hc4c-6x9g-5fq3

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