CVE-2026-77312: Flyto2 Core: Arbitrary file write via unguarded data.*/file.* modules (incomplete fix of CVE-2026-67429)
Critical CVSS 10.0
- OSV id
- GHSA-p34x-fmph-9fjx
- Also known as
- CVE-2026-77312
- Published
- Last modified
Affected packages
| Package | Affected versions | Fixed in |
|---|---|---|
| flyto-core PyPI |
< 2.26.8 | 2.26.8 |
How to fix it
Upgrade flyto-core to 2.26.8 or later.
# in requirements.txt: change the line to flyto-core==2.26.8
pip install -r requirements.txt
- If it is an indirect dependency, upgrade the package that depends on it, or add a minimum version constraint for it (e.g. in constraints.txt, or as a dependency in pyproject.toml).
- Check the changelog for breaking changes (especially across major versions), update the lockfile with the package manager, and run your tests.
Not sure whether your project uses an affected version? Check your lockfile below for free.
Details
[CRITICAL] Arbitrary file write via unguarded data.* / file.* write modules — incomplete fix of GHSA-2956
- CWE: CWE-22 (Path Traversal) / CWE-73 (External Control of File Name or Path); impact reaches CWE-94 (code execution via file overwrite).
- CVSS v3.1:
AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H= 9.3 Critical (S:C because a write escapes the intended sandbox confinement into the host filesystem / other components).- AV:N — reachable via the MCP server / recipe engine (
execute_module). AC:L — deterministic. PR:L — any client able to run a module/recipe (the same attacker model as GHSA-2956; unauthenticated on the HTTP MCP surface per CVE-2026-55786). UI:N. S:C — escapesFLYTO_SANDBOX_DIR. C/I/A:H — arbitrary-content write to any absolute path → overwrite app code / recipes /~/.bashrc/ cron /authorized_keys→ RCE.
- AV:N — reachable via the MCP server / recipe engine (
- Affected component:
flyto-core(PyPIflyto-core), HEADae2b38e(v2.26.7 line). Modulesdata.csv.write(src/core/modules/atomic/data/csv_write.py),data.json_to_csv(.../data/json_to_csv.py),file.copy(.../file/copy.py),file.move(.../file/move.py) — and the broaderdata.*/file.*/report-writer families that do not call the path guard. - Relationship: Incomplete fix of GHSA-2956-977x-2w3r (Critical arbitrary file write, patched in v2.26.6 by commit
d5f89d7). That fix routed a hand-picked module list (image.download/convert/resize/crop/compress/rotate/watermark/qrcode_generate,document.excel_write/pdf_fill_form/word_to_pdf/pdf_to_word,browser.paginationcheckpoint) throughvalidate_path_with_env_config(). It did not cover thedata.*andfile.*write families, which still write a client-controlled path with no confinement.
Reachability (hop-by-hop, guards resolved)
- Client invokes a module via the recipe engine / MCP
execute_module(src/core/mcp_handler.py,mcp_server.py) — the same surface as GHSA-2956 / CVE-2026-55786. data.csv.writereadsfile_path = params.get('file_path')anddata(both client-controlled). Its only path check isif '..' in file_path: raise— a denylist that does not block absolute paths.- It calls
os.makedirs(os.path.dirname(file_path), exist_ok=True)thenopen(file_path, 'w')and writesdata. No call tovalidate_path_with_env_config()— soFLYTO_SANDBOX_DIRconfinement is never applied. data.json_to_csv(output_path),file.copy/file.move(shutil.copy2/shutil.movetodestination) have no path check at all.- An absolute path such as
/home/<user>/.bashrc,/app/src/core/modules/.../<mod>.py, or a.flytorecipe file is written verbatim, outside the sandbox.
Guard analysis: the GHSA-2956 enforcement is per-module (e.g. image/download.py:21 imports and calls validate_path_with_env_config). There is no central path enforcement in the runtime — runtime/languages.py's PathTraversalError guards plugin entry-point loading, not module output paths. So a module that omits the per-module call is entirely unconfined.
Root cause
The remediation for GHSA-2956 confined writes by adding a per-module validate_path_with_env_config() call to an explicit list of modules, rather than enforcing confinement centrally. Any file-writing module absent from that list — the entire data.* and file.* families here — remains an arbitrary-write primitive. data.csv.write's '..'-substring check is a denylist that misses absolute paths.
Impact
Arbitrary file write with attacker-controlled content and path, escaping FLYTO_SANDBOX_DIR. Overwriting a Python module under the install dir, a .flyto recipe, a shell rc, a crontab, or ~/.ssh/authorized_keys yields code execution / full host compromise — the same impact GHSA-2956 was rated Critical for.
Executable PoC (benign sentinel, local only)
FLYTO_SANDBOX_DIR is set to the intended confinement; the module writes outside it while the GHSA-2956 guard rejects the same path.
```python import os, sys, asyncio SBX = os.environ.setdefault('FLYTOSANDBOXDIR', "/tmp/flytosbx"); os.makedirs(SBX, existok=True) sys.path.insert(0, "<flyto-core>/src") OUT = "/tmp/flytoPWNEDOUTSIDE.csv" # absolute, outside the sandbox, no ".." from core.utils import validatepathwithenvconfig, PathTraversalError try: validatepathwithenvconfig(OUT); print("[guard] UNEXPECTED allow") except PathTraversalError: print("[guard] GHSA-2956 guard REJECTS out-of-sandbox path (as intended)") async def call(W, p): return await W(p, {}).execute() from core.modules.atomic.data.csvwrite import csvwrite from core.modules.atomic.data.jsontocsv import jsontocsv asyncio.run(call(csvwrite, {'filepath': OUT, 'data':[{'pwn':'SENTINELCSV'}]})) asyncio.run(call(jsontocsv,{'inputdata':[{'pwn':'SENTINELJSON'}], 'outputpath': OUT+'.json.csv'})) print("wrote outside sandbox:", os.path.exists(OUT), "| inside sandbox?", os.path.realpath(OUT).startswith(os.path.real
References
- GHSA-p34x-fmph-9fjx on OSV.dev
- Web: https://github.com/flytohub/flyto-core/security/advisories/GHSA-p34x-fmph-9fjx
- Web: https://github.com/flytohub/flyto-core/commit/bbb6f1cfec22fee1ea0e6ecf1129d7103c85e09f
- Package: https://github.com/flytohub/flyto-core
- Web: https://github.com/flytohub/flyto-core/releases/tag/v2.26.8
Am I affected?
Upload or paste your lockfile. We check every package version in it against OSV.dev, this advisory included, and email you the vulnerable ones with the version that fixes them. Free, and no account needed.
About this data
Source: GitHub Advisory Database via OSV.dev (CC-BY 4.0). Severity comes from the advisory's own rating when it has one, else from its CVSS score.