You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Allocate run-binding refresh returns an existing lease id without the lease id #4909
refreshExistingRunBinding (packages/daemon/src/resources/lease-registry.ts) returns an existing lease, with its id, to any lease_allocate that repeats the tenant, runId, backend, provider, device key, and clientId of the lease.
The lease id is now the bearer credential for a leased session (ADR 0007). The CLI uses a random clientId and runId, so these act as hidden secrets for CLI clients. A direct RPC or SDK caller that uses a predictable runId and clientId can get another caller's lease id back.
Expected: a run-binding refresh returns the lease only when the request sends that lease id, or the daemon requires runId and clientId with at least 128 random bits before it returns the existing lease.
The issue describes a concrete security defect in refreshExistingRunBinding: repeated lease allocation can return another caller's lease id when identifiers are predictable. It names affected file, behavior, threat model, and expected mitigation.
Related, from the #4911 review: putHostLease (packages/daemon/src/resources/lease-registry.ts) still accepts host-chosen lease ids of 16 hex digits (64 bits), though the id is the client's credential. #4911 enforces 128 bits only on client allocate. Raise the host minimum when the macos-app host can be updated in step.
Activity
apex-sentinel-staging commentedon Nov 21, 2026
Apex Sentinel · Issue review
Suggested label:
bugThe issue describes a concrete security defect in refreshExistingRunBinding: repeated lease allocation can return another caller's lease id when identifiers are predictable. It names affected file, behavior, threat model, and expected mitigation.
Required sections
thymikee commentedon Nov 21, 2026
Follow-up from #4911 (lease id is the session credential on 0.22).
thymikee commentedon Nov 21, 2026
Related, from the #4911 review:
putHostLease(packages/daemon/src/resources/lease-registry.ts) still accepts host-chosen lease ids of 16 hex digits (64 bits), though the id is the client's credential. #4911 enforces 128 bits only on client allocate. Raise the host minimum when the macos-app host can be updated in step.thymikee commentedon Nov 22, 2026
Fixed by #4947 (merged into 0.22).