Skip to content

GET /api/v1/locks leaks bucket+key for buckets the caller has no sealed grant on (trace is filtered, locks is not) #212

Open

Description

@Quyzi

Severity: Medium
Labels: security, authorization, existence-oracle, admin-read, residual
HEAD: a2c1d01

Summary

GET /api/v1/locks (AdminRead: Admin + Auditor) returns every in-flight write lock’s bucket + key with no bucket_readable / sealed-grant filter. After #123/#187, /api/v1/trace correctly drops events for buckets the persona cannot decrypt; locks still disclose foreign object names.

Repro

  1. Alice owns beta (auditor has no grant on beta).
  2. Start a long PUT to beta/hang2.bin as alice (leave body streaming).
  3. As auditor (read grant on alpha only):
curl -s -H "Authorization: Bearer $AUD" \
  'http://127.0.0.1:18501/api/v1/locks?older_than=0s'
# → [{"bucket":"beta","key":"hang2.bin",...}]
  1. Contrast: GET /beta/ as aud → 404; SSE /api/v1/trace as aud shows alpha/... but not beta/....

Impact

Auditor (and Admin without a grant) learn plaintext key paths and bucket existence for ciphertext they cannot open — the same sealed-grant blindness property the project documents and already enforced on listings, object IO, and trace.

Fix

Filter list_stale_locks results with the same bucket_readable(auth, storage, bucket) gate used by trace::trace_event_visible (drop entries on Ok(false) / error). Optionally document that full-admin operational break-glass may set a config flag to see all locks.

Activity

  1. added
    bug
    security
    information-disclosure
    on Oct 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    buginformation-disclosuresecurity

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions