GHSA-WF94-285X-4CGJ
Android onboarding grants account-wide Play Console draft-app permission
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Remediación | Parche 7.99.0 | @capgo/cli · -120 d desde divulgación | |
| Divulgación | Publicada | GHSA-WF94-285X-4CGJ divulgada | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
Android onboarding grants account-wide Play Console draft-app permission
Summary
The new Android onboarding flow grants the generated Google Play service account an account-wide Play Console permission (`CAN_MANAGE_DRAFT_APPS_GLOBAL`) while the UI tells users the service account is invited into one confirmed app with release-only permissions.
This broadens the blast radius of the generated service account key (`PLAY_CONFIG_JSON`): if that key is mishandled or compromised, the service account is not limited to the selected package. It also has developer-account-level permission to create, edit, and delete draft apps across the Google Play developer account.
I did not perform any live exploitation or probing against Capgo infrastructure. This report is based on static review of the merged code and a local mocked reproduction of the request body sent to the Google Play Developer API.
Affected code
Repository: `Cap-go/capgo`
Observed at commit: `85dbbe8ef` (`feat(cli): Android onboarding via Google OAuth (GCP + SA + Play invite automation)`, PR #2064, merged 2026-05-12)
Affected package: `@capgo/cli` 7.98.2
Relevant files:
- `cli/src/build/onboarding/android/play-api.ts:86`
- `cli/src/build/onboarding/android/ui/app.tsx:858`
- `cli/src/build/onboarding/android/ui/app.tsx:1486`
Details
`CAPGO_SA_DEVELOPER_PERMISSIONS` currently contains an account-wide Google Play permission:
export const CAPGO_SA_DEVELOPER_PERMISSIONS = [
'CAN_MANAGE_DRAFT_APPS_GLOBAL',
] as constThe onboarding flow passes that array when inviting the generated service account:
await inviteServiceAccount({
accessToken: tok,
developerId: playAccountChoice.developerId,
serviceAccountEmail: sa.email,
developerAccountPermissions: CAPGO_SA_DEVELOPER_PERMISSIONS,
grants: [{
packageName: androidPackageChoice.packageName,
permissions: CAPGO_SA_APP_PERMISSIONS,
}],
})`inviteServiceAccount()` serializes this to the `User` create request as `developerAccountPermissions`, alongside per-app `grants[].appLevelPermissions`.
Google's Android Publisher API documentation defines `developerAccountPermissions[]` as permissions that apply across the developer account, and defines `CAN_MANAGE_DRAFT_APPS_GLOBAL` as "Create, edit, and delete draft apps." The separate `grants[].appLevelPermissions[]` field is the per-app permission mechanism.
This contradicts the CLI user-facing statement:
> The flow invites one service account into one app (the package you confirm) with release-only permissions.
Local reproduction
From a clean checkout of `Cap-go/capgo` at commit `85dbbe8ef`:
bun --eval "const m = await import('./cli/src/build/onboarding/android/play-api.ts'); let body; globalThis.fetch = async (_url, init) => { body = JSON.parse(init.body); return new Response(JSON.stringify({ email: 'sa@example.com' }), { status: 200 }) }; await m.inviteServiceAccount({ accessToken: 'fake-token', developerId: '1234567890123456789', serviceAccountEmail: 'sa@example.com', developerAccountPermissions: m.CAPGO_SA_DEVELOPER_PERMISSIONS, grants: [{ packageName: 'com.example.app', permissions: m.CAPGO_SA_APP_PERMISSIONS }] }); console.log(JSON.stringify(body, null, 2));"Output:
{
"email": "sa@example.com",
"developerAccountPermissions": [
"CAN_MANAGE_DRAFT_APPS_GLOBAL"
],
"grants": [
{
"packageName": "com.example.app",
"appLevelPermissions": [
"CAN_ACCESS_APP",
"CAN_MANAGE_DRAFT_APPS",
"CAN_MANAGE_TRACK_APKS",
"CAN_MANAGE_PUBLIC_APKS"
]
}
]
}Security impact
The generated service account key is intended to be used by Capgo native build workers for a selected app/package. Because the service account is also granted `CAN_MANAGE_DRAFT_APPS_GLOBAL`, compromise or misuse of that key is not restricted to the selected package's release workflow.
An attacker with the generated service account key could have account-wide capability to create, edit, and delete draft apps in the Google Play developer account. This is not full Play Console admin access and does not include financial or order permissions, so I would rate the issue as low to medium severity. The main risk is violation of least privilege and an unexpected cross-app/account-wide permission boundary.
Suggested fix
Prefer removing `CAN_MANAGE_DRAFT_APPS_GLOBAL` from `CAPGO_SA_DEVELOPER_PERMISSIONS` and relying on the per-app grant for the selected package:
export const CAPGO_SA_DEVELOPER_PERMISSIONS = [] as constwith:
grants: [{
packageName: androidPackageChoice.packageName,
permissions: CAPGO_SA_APP_PERMISSIONS,
}]If Google Play requires at least one developer-level permission for the invited service account to appear in the Users & permissions list, the CLI should make that account-wide permission explicit to the user before consent, or use the narrowest developer-level permission that still satisfies the API flow. The UI copy should also distinguish app-level release permissions from any developer-account-level permission.
References
- Google Play Developer API `users`: `developerAccountPermissions[]` are permissions that apply across the developer account; `CAN_MANAGE_DRAFT_APPS_GLOBAL` creates, edits, and deletes draft apps.
- Google Play Developer API `grants`: `appLevelPermissions[]` are the permissions granted to the user for one app.
- GitHub PR: `https://github.com/Cap-go/capgo/pull/2064`
Incluye detalles técnicos publicados por el investigador. Úselos solo para validar y corregir sus propios sistemas.
Rangos afectados
Estado del parche por paquete
| Paquete / producto | Estado | Corregida en | Desde divulgación | Última versión |
|---|---|---|---|---|
npm@capgo/cli |
Corregida | 7.99.0 | -120 d | 8.107.0 no afectada |
7.99.0Arsenal público
Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.
https://github.com/Cap-go/capgo.app/security/advisories/GHSA-wf94-285x-4cgjLas referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
