GHSA-WC94-386Q-5478
Arbitrary file read via path traversal in data.csv.read, data.yaml.parse, excel.read, pdf.parse and image.ocr modules
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N
Fuente: GitHub
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-WC94-386Q-5478 divulgada · CVSS 7.7 (GitHub) | |
| Remediación | Parche 2.26.11 | flyto-core · 0 d desde divulgación | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
## Summary
The file-reading modules `data.csv.read`, `data.yaml.parse`, `excel.read`, `pdf.parse`, and `image.ocr` read a caller-supplied path and return the parsed contents to the caller. The only guard present (`if '..' in file_path`) is bypassed by an absolute path, and `excel.read`/`image.ocr` have no check at all. An authenticated attacker reads arbitrary host files (secrets, SSH keys, `.env`) outside the sandbox. No existing advisory covers this read-side impact class (2956/p34x are write-only).
## Root Cause
`src/core/modules/atomic/data/csv_read.py:109` guards only with `if '..' in file_path` — an absolute path such as `/etc/passwd` or `/home/app/.aws/credentials` contains no `..` and passes; the `os.path.exists` gate at :106 then passes for real files. `data/yaml_parse.py` and `document/pdf_parse.py` use the same weak `'..'` substring check; `document/excel_read.py` and `image/ocr.py` have NO path check (`grep '..'` = 0). Contents are returned to the caller (csv_read.py:113 `open(file_path,'r')` → `csv.DictReader` → `list(reader)`).
## Impact
Authenticated (PR:L) arbitrary file read / exfiltration of host files outside the sandbox — cloud credentials, SSH keys, `.env`, config secrets. Scope Changed (module sandbox → host filesystem); C:H.
## Proof of Concept
`data.csv.read {"file_path":"/home/app/.aws/credentials"}` → parsed rows (the credentials file) returned in the module result. `image.ocr {"image_path":"/etc/shadow"}` → best-effort OCR'd text.
## Attack Chain
1. Entry: authed execute_module `data.csv.read {file_path:"/home/app/.aws/credentials"}`.
Guard: `if '..' in file_path: raise` at csv_read.py:109. Bypass proof: the absolute path contains no `..`, so it passes; `os.path.exists` at :106 also passes for a real file.
2. Sink: `open(file_path,'r')` at :113 → `csv.DictReader` → `list(reader)` returned in the result.
3. Impact: file contents exfiltrated through the recipe result (secrets, SSH keys, .env).
## Bypass Evidence
`'..' in '/home/app/.aws/credentials'` → `False` (proven). `grep '\.\.'` in excel_read.py and ocr.py → 0 (no check at all). Read-side impact is not covered by 2956/p34x (both are "arbitrary file WRITE").
## Affected Versions
`flyto-core <= 2.26.10` (sinks present on the v2.26.10 release tag).
## Suggested Fix
Replace the `'..'` substring check with a canonicalization-based confinement (`validate_path_with_env_config` / `os.path.realpath` + sandbox-prefix check) on the read path in all five modules, and add the check to `excel.read` and `image.ocr` which currently have none.
---
Reported by zx (Jace) — GitHub: @manus-use
Incluye detalles técnicos publicados por el investigador. Úselos solo para validar y corregir sus propios sistemas.
Desglose de métricas
Rangos afectados
Estado del parche por paquete
| Paquete / producto | Estado | Corregida en | Desde divulgación | Última versión |
|---|---|---|---|---|
pypiflyto-core |
Corregida | 2.26.11 | 0 d | 2.41.0 no afectada |
2.26.11Arsenal público
Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.
https://github.com/flytohub/flyto-core/security/advisories/GHSA-wc94-386q-5478Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
