VYPR
Unrated severityNVD Advisory· Published Jun 20, 2026

Cap-go - Broken Cursor Pagination in /private/devices Endpoint

CVE-2026-56307

Description

Cap-go before 12.128.12 contains a broken cursor pagination vulnerability in the /private/devices endpoint on the Cloudflare/workerd path that allows authenticated attackers to cause duplicate-page loops and make later rows unreachable. Attackers with app.read_devices access can exploit non-advancing cursor filters to trigger infinite pagination loops, prevent dataset traversal, and cause repeated processing in device-management workflows.

AI Insight

LLM-synthesized narrative grounded in this CVE's description and references.

Affected products

2

Patches

Vulnerability mechanics

Root cause

"The cursor filter in `readDevicesCF()` uses `timestamp` and `blob1` columns while the `ORDER BY` clause uses `updated_at` and `device_id`, causing the cursor to never advance past the first row."

Attack vector

An authenticated attacker with `app.read_devices` access sends paginated requests to the `/private/devices` endpoint on the Cloudflare/workerd path. The server returns a `nextCursor` value that, when replayed, returns the same row instead of advancing to the next device. This causes duplicate-page loops, makes later rows unreachable via paginated traversal, and can force clients that follow `nextCursor` while `hasMore=true` into infinite iteration [ref_id=1]. The issue is triggered by the mismatch between the cursor filter (based on `timestamp` and `blob1`) and the `ORDER BY` clause (based on `updated_at` and `device_id`) in the Cloudflare implementation [ref_id=1].

Affected code

The vulnerability resides in the Cloudflare/workerd code path of the `/private/devices` endpoint. The relevant files are `supabase/functions/_backend/utils/stats.ts` (lines 273–286) and `supabase/functions/_backend/utils/cloudflare.ts` (lines 504–574). The `readDevicesCF()` function builds a cursor filter from `timestamp|device_id` but the resulting SQL query uses `ORDER BY updated_at DESC, device_id ASC` while the cursor filter is based on `timestamp` and `blob1`, causing the cursor to never advance past the first row [ref_id=1].

What the fix does

The advisory does not include a published patch diff. The recommended remediation is to align the cursor filter columns with the `ORDER BY` columns in the Cloudflare `readDevicesCF()` function so that the cursor correctly advances past already-seen rows. Until a fix is applied, the advisory notes that the pagination on the Cloudflare/workerd path is broken and can be exploited to cause duplicate-page loops and unreachable rows [ref_id=1].

Preconditions

  • authAttacker must have valid authentication and the `app.read_devices` permission for the target app
  • configThe endpoint must be served on the Cloudflare/workerd runtime path (not the Supabase path)
  • inputAttacker sends paginated requests with a `limit` smaller than the total number of devices

Reproduction

Create a test app and two devices using the provided curl commands, then request page 1 with `limit=1` and observe that the returned `nextCursor` replays the same device instead of advancing to the second device. Full reproduction steps are documented in the advisory's PoC section [ref_id=1].

Generated on Jun 21, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.

References

2

News mentions

0

No linked articles in our index yet.