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

GHSA-59PF-MH94-R7VV

Out-of-sandbox image file read in verify.visual_diff via unvalidated reference_url local-image path

Parche disponible
Descargar PNG JSON
CVSS 3.1
5.0
Media
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:N/A:N 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ón50 dDesde la divulgación, 30 sept 2026, 8:11 a. m.
Detección49 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.33.0
Monitoreo
Detectada +1
30 sept 26
18 nov 26
20 nov 26
30 sept 26
13 oct 26
25 oct 26
7 nov 26
20 nov 26
FechaFaseEventoDetalle
Divulgación Publicada GHSA-59PF-MH94-R7VV divulgada · CVSS 5 (GitHub)
Remediación Parche 2.33.0 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 `verify.visual_diff` module accepts a `reference_url` parameter that may be a local file path, and when it is a local image path the module opens it with no path confinement. Every other filesystem parameter in the same module (the `output_dir` write destination) and in sibling modules is routed through the project's central path guard, but the `reference_url` local-image branch is not. A workflow or recipe author, which is the module's normal caller, can point `reference_url` at an absolute or parent-directory-traversing image path outside the sandbox and have its contents copied into an in-sandbox output file, defeating the read-confinement boundary the project enforces elsewhere. The module is registered and allowed by the default policy, so no configuration change or elevated grant is required.

Root Cause

The module confines its write destination but never confines the reference read source. `validate_params` captures `reference_url` raw and only routes `output_dir` through `validate_path_with_env_config`. In `execute`, the SSRF egress guard `enforce_outbound_url` is applied only when `reference_url` is an `http`/`https` URL; for a local image path that guard is skipped, and the file is opened directly. The result is that an attacker-chosen filesystem path is read with no containment check, in contrast to `file.read` and the vision modules, which route their reads through the same central guard.

src/core/modules/atomic/verify/visual_diff.py
  validate_params: reference_url captured raw (self.params.get('reference_url')); only output_dir routed through validate_path_with_env_config
  execute: enforce_outbound_url is gated on the URL branch; the local-image branch calls Image.open(self.reference_url) with no path confinement, then saves a PNG copy into the confined output_dir

Impact

An attacker who can submit a workflow or recipe (the module's normal trust boundary) can read the contents of image files located outside the sandbox directory and have them copied into an in-sandbox output file, from which a follow-on workflow step can retrieve or forward them. The read primitive is constrained to files that the imaging library can decode and that carry an image suffix, so it is an arbitrary image read rather than an arbitrary text-file read; symlink or non-image targets are rejected by the decoder. The demonstrated capability is the exfiltration of private screenshots, scanned documents, or design assets stored outside the sandbox on the host. The impact crosses the read-confinement boundary that the central guard enforces everywhere else, so the affected component's authority is exceeded even though no host file write or modification occurs through this path.

Proof of Concept

`Requires the package installed with Pillow available. A secret image is placed outside the sandbox directory; the workflow points reference_url at it and writes the copy into an in-sandbox output_dir.`

  1. Create a marker image outside the sandbox, for example `/tmp/host_secrets/private_scan.png` containing a known marker pixel.
  2. Invoke `verify.visual_diff` with `reference_url` set to that out-of-sandbox path, `dev_url` set to any URL that passes the SSRF guard, and `output_dir` set to an in-sandbox path.
  3. Observe that `validate_params` accepts the out-of-sandbox `reference_url`, the local-image branch copies it to `output_dir/ref_<timestamp>.png`, and the marker pixel is recoverable from the copy.
validate_params(): accepted reference_url outside sandbox
execute(): copied /tmp/host_secrets/private_scan.png -> <output_dir>/ref_<ts>.png
marker pixel (255,0,255) recovered from in-sandbox copy
negative control: validate_path_with_env_config refused the same path (Path escapes base directory)

Attack Chain

  1. Exposure: A workflow or recipe author submits a `verify.visual_diff` step. The module is not in the default module denylist and its declared permissions are not in the dangerous-permission set, so it runs by default with no grant.
  2. Control: The attacker fully controls `reference_url`. It is stored raw during parameter validation with only a non-empty check applied.
  3. Path: During execution the module classifies `reference_url` as a local image (a non-URL path with an image suffix) and takes the local-image branch.
  4. Guard: The SSRF egress guard runs only on the URL branch, and no path-confinement guard is applied to the local-image branch, so the attacker-chosen path reaches the reader unchecked. The `output_dir` write is separately confined and does not constrain the read.
  5. Primitive: The module opens the out-of-sandbox file with the imaging library and re-encodes it into an in-sandbox PNG copy.
  6. Result: The contents of an arbitrary out-of-sandbox image are made available inside the sandbox, retrievable or forwardable by a follow-on in-sandbox step.

Bypass Evidence

The module's own `output_dir` parameter and the sibling `file.read` and vision modules all route filesystem access through `validate_path_with_env_config`, so the read-confinement boundary is established and enforced by the project. This finding is a gap in that boundary: the local-image branch of `reference_url` has no such call. Prior advisories in this read-confinement class do not cover this module. The advisory for the vision modules (`vision.analyze`, `vision.compare`, `ai.vision.analyze`) added the path guard to exactly those three modules; the corresponding fix commit does not touch `visual_diff`. The SSRF-focused advisory for the `verify.*` and browser navigation modules added an egress guard on the URL branch only and explicitly does not confine the local-image read. Advisories covering `data.*`, `verify.spec`, `excel.read`, `pdf.parse`, and `image.ocr` do not list this module. The strongest counter-arguments were tested and failed: the module is reachable by default (not denylisted); parameter validation does not confine `reference_url`; the SSRF guard does not apply to the local branch; and the confinement guard is active by default because its base directory defaults to the working directory and the containment check runs regardless of the absolute-path allowance flag. The one counter-argument with substance, that the imaging library only decodes image files, narrows the primitive to image content and is reflected in the confidentiality rating, but does not remove the read-confinement bypass.

Affected Versions

  • `Ecosystem: PyPI`
  • `Package: flyto-core`
  • `Confirmed affected range: <= 2.31.2`
  • `Latest release checked: 2.31.2 (latest released tag; reconfirm against the PyPI registry at publication)`
  • `Fix status: not fixed`

The unguarded local-image read is present in the latest released version 2.31.2 and identical at the current development head, verified by an empty source diff between the released tag and head for the affected file. The lower boundary of the affected range is not pinned; the module's SSRF guard was added in an earlier release but that change does not bound the introduction of the local-image read, so no proven `>=` introduction is asserted.

Suggested Fix

Route `reference_url` through the same central path-confinement guard (`validate_path_with_env_config`) that already protects `output_dir`, before the local-image branch opens the file, so the read source is confined to the sandbox directory. The guard must cover the local-image branch specifically, since the existing SSRF egress check only applies to the URL branch. As an interim mitigation, operators can restrict the module surface with an explicit module allowlist that excludes `verify.visual_diff`, or deny untrusted callers the ability to submit workflows that use it.

Reported by zx (GitHub: @manus-pi).

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:L
AltoBajoNinguno
IntegridadI:N
AltoBajoNinguno
DisponibilidadA:N
AltoBajoNinguno
Versiones

Rangos afectados

Afectada Corregida Última
flyto-core< 2.33.0
2.33.0
2.41.0
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
pypiflyto-core
Corregida 2.33.0 0 d 2.41.0 no afectada
Versiones corregidas2.33.0
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-59pf-mh94-r7vv

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