GHSA-XCHH-CP84-9838
Arbitrary file write in browser.{snapshot,trace,cookies_file}, word.parse and pdf.generate modules (RCE)
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
Fuente: GitHub
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-XCHH-CP84-9838 divulgada · CVSS 9.9 (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
Several file-writing modules — `browser.snapshot`, `browser.trace`, `browser.cookies_file`, `word.parse` (image extraction), and `pdf.generate` — write to a fully caller-controlled path with no path validation (`validate_path_with_env_config` absent). An authenticated attacker writes attacker-influenced content to an arbitrary absolute path outside the sandbox (RCE), and `browser.cookies_file` additionally reads an arbitrary path on import and exfiltrates the live cookie jar on export.
## Root Cause
`grep validate_path_with_env_config` = 0 in all five modules; all are registered and pass `enforce_module_policy` under default config.
- `browser.snapshot`: write at :181-183.
- `browser.trace`: `tracing.stop(path=...)` at :225-226 (caller path).
- `browser.cookies_file`: write at :103, plus reads an arbitrary path on import and writes the live cookie jar to an arbitrary path on export (write + exfil).
- `word.parse` extract_images: `open(target,'wb')` at :200 (`commonpath` confinement is computed against the caller-controlled `images_output_dir`, so it does not confine).
- `pdf.generate`: `SimpleDocTemplate(output_path)` at :126-127 (content caller-controlled).
These sinks are outside every advisory enumeration: 2956 covers image/document *convert/fill-form* operations and browser.pagination; p34x covers data.*/file.*/report-writer families. `browser.*`, `word.parse`, and `pdf.generate` are not covered. (Note: `verify.report`/`warroom.report`/`data.dedup` were intentionally DROPPED from this advisory during gate review as arguably inside p34x's "report-writer/data.*" catch-all.)
## Impact
Authenticated (PR:L) arbitrary file write with attacker-influenced content at an attacker-chosen path outside the sandbox → overwrite of startup/cron/import-path files = RCE. `browser.cookies_file` additionally gives arbitrary file read + live-cookie-jar exfiltration (C:H). Scope Changed (module sandbox → host filesystem). I:H/A:H.
## Proof of Concept
`pdf.generate {"output_path":"/home/app/.config/systemd/user/x.service", "content":[<attacker text>]}` → an attacker-shaped file at an attacker-chosen path. `browser.cookies_file` export writes the live cookie jar to an arbitrary path (write + exfil).
## Attack Chain
1. Entry: authed execute_module `pdf.generate {output_path:"/home/app/.config/systemd/user/x.service", content:[...attacker text...]}` (or `browser.cookies_file` with a chosen path).
Guard: none. Bypass proof: `grep validate_path_* ` = 0 in all five modules; the output path is used verbatim.
2. Sink: `SimpleDocTemplate(output_path).build(...)` at pdf_generate.py:126-127 / `open(target,'wb')` word_parse.py:200 / cookie-jar write in cookies_file.py:103.
3. Impact: attacker-shaped file at an attacker-chosen path outside the sandbox → RCE; cookie-jar exfiltration for cookies_file.
## Bypass Evidence
`grep -c validate_path_with_env_config` = 0 across browser/snapshot.py, browser/trace.py, browser/cookies_file.py, document/word_parse.py, document/pdf_generate.py. `word.parse` `commonpath` check is against the caller-supplied `images_output_dir`, so it does not constrain the destination.
## Affected Versions
`flyto-core <= 2.26.10` (sinks present on the v2.26.10 release tag).
## Suggested Fix
Add `validate_path_with_env_config()` (the guard used by the p34x-fixed write modules) to each output-path parameter before `open`/`makedirs`/`SimpleDocTemplate`/`tracing.stop`, and confine `browser.cookies_file` import/export to the sandbox directory.
---
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-xchh-cp84-9838Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
