GHSA-662F-HR85-MG6C
browser.goto bypasses SSRF validation by re-navigating to the www-toggled host
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-662F-HR85-MG6C divulgada · CVSS 8.5 (GitHub) | |
| Remediación | Parche 2.26.12 | flyto-core · 0 d desde divulgación | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
Summary
A caller who supplies a `browser.goto` URL reads internal HTTP services that the SSRF guard is meant
to block, and gets the response body back because the page is rendered. `browser.goto` validates the
URL it was given, then on failure navigates to the same host with `www.` added or removed, and that
second host is never validated. Exploiting it needs one attacker-controlled domain and no privileges
beyond submitting a URL.
Reproduction
The attacker needs one domain where `www` resolves to a closed public port and the apex resolves to
the target. The closed port yields `ERR_CONNECTION_REFUSED`, which is already in
`_WWW_TOGGLE_PATTERNS`, so it is the attacker who decides that the toggle fires.
- Point `www.evil.test` at a closed public port. Point `evil.test` at the internal address you want
- Submit `http://www.evil.test/` as the `url` parameter of `browser.goto`.
- `validate_params()` passes `self.url` to `validate_url_with_env_config`. `www.evil.test` resolves
- The navigation fails with `ERR_CONNECTION_REFUSED`. `_try_www_toggle()` builds
- Read the internal response with `browser.extract`, `browser.readability`, `browser.snapshot` or
Observed running your own `BrowserDriver` with real headless Chromium, no flyto-core code modified.
The only elements simulated were the two DNS answers, which is what the attacker supplies:
internal service : http://127.0.0.1:63183/ canary INTERNAL-ONLY-0861f12fc58e
DEPLOYMENT_MODE : None, so 'local', so the egress guard is not installed
module returned : {'status': 'success', 'url': 'http://evil.test/'}
URLs given to the SSRF guard : ['http://www.evil.test/']
final browser URL : http://evil.test/
internal service received : [('evil.test', '/')]
canary in page content : TrueThe internal service logged the request, so this is a real fetch. The canary is served only on
loopback and appears in the page content, so the body is readable. The module returns
`status: success`, so an operator sees a normal navigation.
Three layers could stop this and none does:
- `_try_www_toggle` navigates to `alt_url` without calling `validate_url_with_env_config`.
- `driver.goto()` at `src/core/browser/driver.py:623` calls `_ensure_page()`, logs, and passes the
- The egress guard at `src/core/browser/driver.py:519` returns before installing unless
Worth noting: `validate_params` carries a `# SECURITY: Validate URL against SSRF attacks` comment and
an opt-out that cloud modes cannot disable. The guard is deliberate. One path in that file skips it.
Impact
Anyone who can hand a URL to `browser.goto` makes your worker open a page from inside its own network
and gives them the contents. The worker sits behind the firewall, so this reaches addresses the caller
has no route to from outside: internal dashboards, admin panels, service APIs on private addresses,
and the cloud instance-metadata address that issues short-lived credentials to the host. Blocking
those addresses is what the SSRF check is there for.
The page opens in a real browser and renders fully, so `browser.extract`, `browser.readability`,
`browser.snapshot` and `browser.screenshot` hand the caller its text and its appearance. The attacker
reads the internal page. This leaks data outright; it is not a blind request that only succeeds or
fails.
What it costs the attacker: one domain they already own, plus the ability to submit a URL. No elevated
role, no action by any victim, no timing window. The module returns `status: success`, so the operator
sees an ordinary navigation and gets no signal that a block was bypassed. On a deployment built from
the repository's own Dockerfile, the backup control written for this exact case is switched off, which
leaves the skipped validation as the only thing between a submitted URL and an internal read.
Suggested remediation
- Call `validate_url_with_env_config(alt_url)` in `_try_www_toggle` before navigating, the same call
- Validate inside `driver.goto()` as well, so any future caller that forgets is still covered.
- Consider installing the egress guard outside cloud mode, or setting `DEPLOYMENT_MODE` in the main
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.12 | 0 d | 2.41.0 no afectada |
2.26.12Arsenal 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-662f-hr85-mg6cLas referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
