Summary
An upload-scoped API key can directly modify public.app_versions.r2_path through Supabase PostgREST, then soft-delete that version to make Capgo's on_version_update cleanup trigger delete the attacker-controlled r2_path.
I confirmed in production that an upload-capable key can:
- create or control one
app_versions row,
- PATCH that row's
r2_path to point at another live bundle object,
- soft-delete the controlled version so cleanup deletes the retargeted R2 object.
Impact
Upload-scoped API keys can destroy or disrupt other apps' live OTA bundles by retargeting r2_path and triggering delete cleanup.
CWE-862. Reported by @Judel777.
Fix
This was fixed by intentional security PR #3104 (fix(security): reject foreign r2_path retarget on version delete), merged 2026-08-17.
Adds guard_app_version_r2_path so r2_path must be null or the canonical orgs/{owner_org}/apps/{app_id}/{name}.zip, and skips trash of non-canonical paths. Advisory package metadata lists patched_versions 12.128.2.
Maintainer note (2026-08-24): the original long-form description was accidentally overwritten during triage API testing. Restored from retained excerpts + the merged fix PR. Contact Capgo if you need the full original reporter writeup recovered from backups.
Summary
An upload-scoped API key can directly modify
public.app_versions.r2_paththrough Supabase PostgREST, then soft-delete that version to make Capgo'son_version_updatecleanup trigger delete the attacker-controlledr2_path.I confirmed in production that an upload-capable key can:
app_versionsrow,r2_pathto point at another live bundle object,Impact
Upload-scoped API keys can destroy or disrupt other apps' live OTA bundles by retargeting
r2_pathand triggering delete cleanup.CWE-862. Reported by @Judel777.
Fix
This was fixed by intentional security PR #3104 (
fix(security): reject foreign r2_path retarget on version delete), merged 2026-08-17.Adds
guard_app_version_r2_pathsor2_pathmust be null or the canonicalorgs/{owner_org}/apps/{app_id}/{name}.zip, and skips trash of non-canonical paths. Advisory package metadata lists patched_versions12.128.2.