Capgo - App Existence Oracle via GET /statistics/app/:app_id
Description
Capgo before 12.128.2 contains an information disclosure vulnerability in the GET /statistics/app/:app_id endpoint that allows app-limited API keys to distinguish existing sibling app IDs through differential error responses. Attackers can enumerate real app IDs outside their allowed scope by observing 500 PGRST116 errors for inaccessible apps versus 401 errors for nonexistent apps, breaking tenant isolation.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Affected products
1Patches
Vulnerability mechanics
Root cause
"The statistics endpoint returns different HTTP status codes and error messages for real sibling app IDs outside the API key's scope (500/PGRST116) versus nonexistent app IDs (401), creating an app existence oracle."
Attack vector
An attacker possessing an app-limited API key can enumerate real sibling app IDs by sending GET requests to `/statistics/app/:app_id`. A nonexistent app ID returns a 401 `no_access_to_app` error, while a real sibling app ID outside the key's `limited_to_apps` scope returns a 500 `cannot_get_app_statistics` error with a `PGRST116` code indicating zero rows [ref_id=1]. This differential response creates an app existence oracle, breaking tenant isolation and allowing the attacker to discover valid app IDs belonging to the same account.
Affected code
The vulnerability resides in `supabase/functions/_backend/public/statistics/index.ts` (lines 553-575), where the statistics endpoint first authorizes via `checkPermission()` and then uses an authenticated Supabase client to fetch the app row. The RBAC logic in `supabase/functions/_backend/utils/rbac.ts` (lines 257-285) and the SQL function in `supabase/migrations/20251222140030_rbac_system.sql` (lines 3592-3607) allow a scoped API key to pass the initial permission gate based on the broader owner-user principal, but the subsequent database query fails distinctively for real sibling apps outside the key's scope.
What the fix does
The advisory does not include a published patch diff, but the recommended fix is to ensure that the statistics endpoint returns a consistent error response (e.g., a generic 401 or 404) regardless of whether the app ID is nonexistent or exists but is outside the API key's scope [ref_id=1]. This would eliminate the differential error that allows attackers to distinguish real sibling apps from fake ones.
Preconditions
- authAttacker must possess an app-limited API key restricted to a subset of apps
- networkAttacker must be able to send HTTP requests to the Capgo API endpoint
Generated on Jun 21, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
2- github.com/Cap-go/capgo/security/advisories/GHSA-73p9-mprg-7r75mitrevendor-advisory
- www.vulncheck.com/advisories/capgo-app-existence-oracle-via-get-statistics-app-app-idmitrethird-party-advisory
News mentions
0No linked articles in our index yet.