{"vuln_id":"GHSA-pfg2-w999-497v","aliases":["CVE-2026-77313"],"description":"Flyto2 Core: SSRF guard validates the resolved IP but connects by hostname, allowing DNS-rebinding TOCTOU","published_at":"2026-11-20T00:09:23Z","modified_at":"2026-11-20T00:15:06.487555Z","first_seen_at":"2026-11-21T19:15:19.327184Z","severity":"high","severity_source":"ghsa","cvss_score":7.1,"cvss_vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:L/A:N","cwe":["CWE-367","CWE-918"],"vendor":null,"product":null,"kev":{"is_kev":false,"date_added":null,"due_date":null,"ransomware":false},"epss":null,"epss_percentile":null,"nvd_status":null,"enriched_at":null,"links":{"nvd":"https://github.com/advisories/GHSA-pfg2-w999-497v"},"matched_alias":null,"items":[{"id":10682,"source":{"id":"osv","name":"OSV.dev"},"title":"GHSA-pfg2-w999-497v: Flyto2 Core: SSRF guard validates the resolved IP but connects by hostname, allowing DNS-rebinding TOCTOU","summary":"Flyto2 Core: SSRF guard validates the resolved IP but connects by hostname, allowing DNS-rebinding TOCTOU\n\n## 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).\n\nAffected: PyPI:flyto-core\n\nFixed in: 2.26.8\n\nReferences:\nhttps://github.com/flytohub/flyto-core/security/advisories/GHSA-pfg2-w999-497v\nhttps://github.com/flytohub/flyto-core/commit/bf748df864d348004cf45d830bc59f62c5c4a58a\nhttps://github.com/flytohub/flyto-core\nhttps://github.com/flytohub/flyto-core/releases/tag/v2.26.8","url":"https://osv.dev/vulnerability/GHSA-pfg2-w999-497v","published_at":"2026-11-20T00:09:23Z","updated_at":"2026-11-20T00:15:06.487555Z","fetched_at":"2026-11-21T19:15:55.946100Z","severity":"high","cvss_score":7.1,"epss":0.00296,"is_kev":false,"has_exploit":false,"kev_due_date":null,"vendor":null,"product":"flyto-core","vuln_id":"CVE-2026-77313","vuln_ids":["CVE-2026-77313","GHSA-PFG2-W999-497V"],"tags":["osv","pypi","fix-available"],"cluster_id":2103,"links":{"self":"https://vulnwatch.ve1ve2.com/api/v1/items/10682","html":"https://vulnwatch.ve1ve2.com/item/10682"}},{"id":2337,"source":{"id":"ghsa","name":"GitHub Security Advisories"},"title":"GHSA-pfg2-w999-497v / CVE-2026-77313: Flyto2 Core: SSRF guard validates the resolved IP but connects by hostname, allowing DNS-rebinding TOCTOU","summary":"Flyto2 Core: SSRF guard validates the resolved IP but connects by hostname, allowing DNS-rebinding TOCTOU\n\n## 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).\n\nAffected packages: pip:flyto-core\nPatched: flyto-core 2.26.8","url":"https://github.com/advisories/GHSA-pfg2-w999-497v","published_at":"2026-11-20T00:09:23Z","updated_at":"2026-11-20T00:09:24Z","fetched_at":"2026-11-21T19:15:18.416760Z","severity":"high","cvss_score":7.1,"epss":0.00296,"is_kev":false,"has_exploit":false,"kev_due_date":null,"vendor":null,"product":"flyto-core","vuln_id":"CVE-2026-77313","vuln_ids":["CVE-2026-77313","GHSA-PFG2-W999-497V"],"tags":["ghsa","pip","CWE-367","CWE-918"],"cluster_id":2103,"links":{"self":"https://vulnwatch.ve1ve2.com/api/v1/items/2337","html":"https://vulnwatch.ve1ve2.com/item/2337"}},{"id":9326,"source":{"id":"nvd","name":"NVD CVE API 2.0"},"title":"CVE-2026-77313: 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 hostnam…","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.\n\nReferences:\nhttps://github.com/flytohub/flyto-core/commit/bf748df864d348004cf45d830bc59f62c5c4a58a\nhttps://github.com/flytohub/flyto-core/releases/tag/v2.26.8\nhttps://github.com/flytohub/flyto-core/security/advisories/GHSA-pfg2-w999-497v\nhttps://github.com/flytohub/flyto-core/security/advisories/GHSA-pfg2-w999-497v","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-77313","published_at":"2026-11-19T22:18:44.183000Z","updated_at":"2026-11-20T17:18:26.793000Z","fetched_at":"2026-11-21T19:15:31.484930Z","severity":"high","cvss_score":7.1,"epss":0.00296,"is_kev":false,"has_exploit":false,"kev_due_date":null,"vendor":null,"product":null,"vuln_id":"CVE-2026-77313","vuln_ids":["CVE-2026-77313","GHSA-PFG2-W999-497V"],"tags":["CWE-367","CWE-918"],"cluster_id":2104,"links":{"self":"https://vulnwatch.ve1ve2.com/api/v1/items/9326","html":"https://vulnwatch.ve1ve2.com/item/9326"}}]}