flyto-core Arbitrary File Write via Unguarded data.* / file.* Modules (CVE-2026-77312)
Published: 2026-11-25 • Researcher: googlesky (Lê Hiếu), PoC/lab; flytohub via GHSA-p34x-fmph-9fjx (vendor advisory)
- Severity
- Critical
- CVE
- CVE-2026-77312 (GHSA-p34x-fmph-9fjx)
- Category
- misc
- Affected product
- Flyto2 Core (flytohub/flyto-core), execution kernel for automation and AI-agent workflows
- Affected versions
- Prior to 2.26.8 (all versions <= 2.26.7; NVD range "< 2.26.8")
- Disclosed
- 2026-11-25
- Patch status
- Patched
Tags
References
- https://nvd.nist.gov/vuln/detail/CVE-2026-77312
- https://www.cve.org/CVERecord?id=CVE-2026-77312
- https://github.com/flytohub/flyto-core/security/advisories/GHSA-p34x-fmph-9fjx
- https://github.com/advisories/GHSA-h9f9-h6gm-wc85
- https://github.com/flytohub/flyto-core/commit/bbb6f1cfec22fee1ea0e6ecf1129d7103c85e09f
- https://github.com/flytohub/flyto-core/releases/tag/v2.26.8
- https://github.com/googlesky/CVE-2026-77312
Archive entry
intelseclab/poc-archiveOn this page
Metadata
| Field | Value |
|---|---|
| Date Added | 2026-11-25 |
| Last Updated | 2026-11-23 |
| Author / Researcher | googlesky (Lê Hiếu), PoC/lab; flytohub via GHSA-p34x-fmph-9fjx (vendor advisory) |
| CVE / Advisory | CVE-2026-77312 (GHSA-p34x-fmph-9fjx) |
| Category | misc |
| Severity | Critical |
| CVSS Score | 10.0 (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:H/A:H) |
| Status | PoC |
| Tags | path-traversal, arbitrary-file-write, flyto-core, MCP, AI-agent-workflows, sandbox-escape, Python, incomplete-fix, CWE-22, code-execution |
| Related | N/A |
Affected Target
| Field | Value |
|---|---|
| Software / System | Flyto2 Core (flytohub/flyto-core), execution kernel for automation and AI-agent workflows |
| Versions Affected | Prior to 2.26.8 (all versions <= 2.26.7; NVD range “< 2.26.8”) |
| Language / Platform | Python; module/recipe engine (MCP / recipe callers) |
| Authentication Required | Partial — a caller able to execute modules or recipes with a controlled file_path is required; no separate end-user auth is described |
| Network Access Required | Yes in the lab (HTTP wrapper); in production it depends on how the kernel exposes module execution (MCP transport, HTTP API, hosted recipes) |
Summary
Flyto2 Core is an execution kernel for automation and AI-agent workflows. An incomplete earlier fix left the data and file write families outside the sandbox path guard: the CSV write module relied on a substring denylist for dot-dot and therefore accepted absolute paths, while sibling modules such as the JSON-to-CSV writer, file copy and file move performed no confinement check at all. A caller able to execute modules or recipes can supply an absolute output path and write attacker-controlled content outside the configured sandbox directory, potentially overwriting application code, recipes, startup files, scheduled-task files or authorization files and escalating to code execution on the host. The issue is fixed in flyto-core 2.26.8.
Vulnerability Details
Root Cause
The earlier CVE-2026-67429 remediation (GHSA-2956) applied validate_path_with_env_config() to only a hand-picked set of file-writing modules. In flyto-core <= 2.26.7, src/core/modules/atomic/data/csv_write.py still guarded only against the literal “..” substring:
| |
An absolute path such as /work/outside.txt contains no “..”, so it passes the check and reaches open(file_path, ‘w’). The guard also never resolved the path or compared it against FLYTO_SANDBOX_DIR. data.json_to_csv (json_to_csv.py), file.copy (copy.py), file.move (move.py) and other modules in the broader data., file. and report-writer families accepted caller-controlled output or destination paths with no canonical guard at all. The incomplete fix therefore left the whole write family outside the sandbox confinement boundary.
Attack Vector
A client that can execute flyto-core modules or recipes — for example an MCP client or a recipe-driven workflow — invokes data.csv.write (or a sibling write module) with an attacker-controlled absolute output path and attacker-controlled data rows. The absolute path bypasses the substring denylist, the module creates any missing parent directory with os.makedirs and writes the CSV with csv.DictWriter. No authentication beyond the ability to invoke the module is described in the advisory.
Impact
Arbitrary file write outside FLYTO_SANDBOX_DIR with attacker-controlled content. Depending on the files the kernel user can reach, this can overwrite application code, recipe definitions, shell startup files such as ~/.bashrc, cron entries or authorized_keys, turning the write primitive into code execution on the host. The NVD record rates integrity and availability impact High with a changed scope (CVSS 10.0). The public PoC lab demonstrates the outside-root write primitive; the escalation step is described but not executed end-to-end.
Environment / Lab Setup
OS: Linux with Podman (or Docker)
Target: cve-2026-77312:vuln — python:3.12-alpine running the verbatim
csv_write() from flyto-core v2.26.7
cve-2026-77312:fixed — same harness with the verbatim v2.26.8
csv_write() plus the verbatim validate_path_with_env_config(),
validate_path_safe() and get_safe_path_config() helpers
Sandbox: FLYTO_SANDBOX_DIR=/work/sandbox; outside-root marker /work/outside.txt
Attacker: cve-2026-77312-poc:local (stdlib-only Python 3.12 driver)
Tools: Podman/Docker, Python 3, the repo run-lab.sh driver
Network: isolated cve77312lab container network; service listens on port 8080Setup Steps
| |
The fixed side is the differential control: it embeds the genuine upstream v2.26.8 fix, so a safe result there confirms the harness is exercising the real guard rather than a lab artefact.
Proof of Concept
Step-by-Step Reproduction
Start the lab — build and launch both containers with ./run-lab.sh build and ./run-lab.sh up. fw-vuln runs the verbatim vulnerable csv_write(); fw-fixed runs the patched version. Both expose POST /write and GET /info on port 8080.
Exercise the primitive — run the standalone exploit against the vulnerable side. It sends mode “absolute”, which asks the harness to call data.csv.write with file_path /work/outside.txt and data row marker,PWNED.
Shell script1python3 exploit/exploit.py --host=fw-vulnConfirm the differential — run the same driver against the fixed side. The absolute path now raises PathTraversalError from the canonical containment check.
Shell script1python3 exploit/exploit.py --host=fw-fixedProbe the guard gap — the poc/poc.py driver also tests traversal (/work/sandbox/../outside.txt) and a benign in-root write (/work/sandbox/out.csv). Traversal was already blocked by the old substring denylist; only the absolute path bypass reveals the incomplete fix, and the benign write succeeds on both builds.
Shell script1 2python3 poc/poc.py probe --host=fw-vuln python3 poc/poc.py probe --host=fw-fixedEscalation (described, not executed by the PoC) — the same primitive can target application code, recipes, ~/.bashrc, cron files or authorized_keys when the kernel user can write them, which yields code execution on the host.
Exploit Code
See
exploit/exploit.pyfor the standalone driver,poc/poc.pyfor the check/exploit/probe/mitigation modes, andlab/harness-vuln.pyfor the verbatim vulnerable csv_write() exercised by the lab. The HTTP wrapper islab/service.py.
The core request the driver makes is:
| |
The harness then calls, with the verbatim v2.26.7 function:
| |
Expected Output
Vulnerable side (exit 1, outside-root write confirmed):
| |
Fixed side (exit 0, path rejected):
| |
The captured evidence files are in evidence/: exploit-vuln-run.txt, exploit-fixed-run.txt, check-vuln-run.txt and versions.txt.
Detection & Indicators of Compromise
- flyto-core / MCP / recipe audit logs showing data.csv.write, data.json_to_csv, file.copy or file.move invoked with absolute paths, paths containing “..”, or destinations outside FLYTO_SANDBOX_DIR.
- New or modified CSV files, shell startup files, cron entries, scheduled-task definitions or authorized_keys files outside the configured sandbox directory, especially with unexpected ownership or modification times.
- os.makedirs activity creating unexpected parent directories for a write destination, or writes followed immediately by execution of the written file.
- In the reference lab only, POST /write and GET /info requests to port 8080 (the real product exposes modules through its MCP/recipe interface, not this wrapper).
- Kernel or service restarts, or recipe runs that fail with PathTraversalError “Path escapes base directory” after the upgrade — a possible sign of an attempted or adapted exploit.
SIEM / IDS rule (example):
| |
Remediation
| Action | Detail |
|---|---|
| Patch | Upgrade to flyto-core 2.26.8 or later (commit bbb6f1cfec22fee1ea0e6ecf1129d7103c85e09f), which routes csv_write and the sibling file-writing modules through validate_path_with_env_config(); the PoC repository’s own sweep of the fixed line found no residual unguarded write. |
| Workaround | If upgrading is not possible, restrict which clients and recipes may invoke the data.* and file.* write modules, run the kernel as a low-privilege account in a container, and do not give that account write access to application code, recipes, startup files, cron directories or authorization files. |
| Config Hardening | After upgrading, always set FLYTO_SANDBOX_DIR explicitly (otherwise it defaults to the working directory), keep FLYTO_ALLOW_ABSOLUTE_PATHS=false where workflows permit, mount application code and configuration read-only, isolate each tenant/recipe in its own container, and alert on write-module invocations with absolute destinations. |
References
Notes
Auto-ingested from https://github.com/googlesky/CVE-2026-77312 on 2026-11-25.
Review verdict: the repository contains a real exploit driver plus a containerized differential lab, not a detector or scanner. It is an exploit-grade reproduction of the write primitive, but it is lab-only: the harness embeds the verbatim upstream csv_write() (and, on the fixed side, the verbatim upstream guard helpers) behind a small HTTP wrapper rather than running a full flyto-core MCP/recipe server. The PoC confirms the arbitrary outside-root file write and prints the escalation rationale, but it does not execute the code-execution step against a real install, so Status is PoC rather than Weaponized. The pocs/poc.py check/probe/mitigation modes are verification helpers for the same primitive and were archived as part of the upstream PoC set.
License: MIT (Copyright (c) 2026 Lê Hiếu), reproduced with attribution. The upstream repository does not include a separate exploit license, so all files remain under the MIT terms. Binaries/images and the excluded TRACKING.md working record were not copied; the four captured evidence run logs that support the expected output were.
Limitations: results are specific to the lab’s /work/sandbox layout and marker file; real-world exploitation additionally requires a caller that can invoke the vulnerable modules with a controlled path and a writable target outside the sandbox (for example application code, recipes, startup files or scheduled-task files). The fixed-side result depends on FLYTO_SANDBOX_DIR being set as in the lab. Run only against systems you own or have written authorization to test.
| |