Detect and surface atomic passkey counter anomalies #641

Closed
opened 2026-08-12 10:21:50 +00:00 by timmy · 0 comments
Owner

Evidence

Passkey verification currently reads sign_count and later updates it with sign_count <= new_count. Two workers can therefore accept assertions verified against the same old nonzero counter, and equal nonzero counters are accepted. No open/closed issue title or recent commit covers passkey assertion-counter compare-and-swap or clone detection.

User impact

Fail closed before creating a session or fresh-authorization grant when a nonzero authenticator counter is stale, and surface a privacy-bounded Security Activity event with remediation guidance. Counterless authenticators (0 -> 0) remain supported.

Acceptance tests

  • Two stores advancing the same expected nonzero counter allow exactly one winner.
  • Equal/lower nonzero counters fail; 0 -> 0 remains valid.
  • Stale sign-in creates no session cookie and records a bounded anomaly event.
  • Stale fresh authorization creates no grant and records the event.
  • Security Activity labels the anomaly and advises removing/re-enrolling the affected passkey.
  • Full suite and Gitea Actions pass.
## Evidence Passkey verification currently reads `sign_count` and later updates it with `sign_count <= new_count`. Two workers can therefore accept assertions verified against the same old nonzero counter, and equal nonzero counters are accepted. No open/closed issue title or recent commit covers passkey assertion-counter compare-and-swap or clone detection. ## User impact Fail closed before creating a session or fresh-authorization grant when a nonzero authenticator counter is stale, and surface a privacy-bounded Security Activity event with remediation guidance. Counterless authenticators (`0 -> 0`) remain supported. ## Acceptance tests - Two stores advancing the same expected nonzero counter allow exactly one winner. - Equal/lower nonzero counters fail; `0 -> 0` remains valid. - Stale sign-in creates no session cookie and records a bounded anomaly event. - Stale fresh authorization creates no grant and records the event. - Security Activity labels the anomaly and advises removing/re-enrolling the affected passkey. - Full suite and Gitea Actions pass.
timmy added the
P1
backend
frontend
labels 2026-08-12 10:21:50 +00:00
timmy self-assigned this 2026-08-12 10:21:50 +00:00
timmy closed this issue 2026-08-12 10:29:04 +00:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: stackchain/stackchain-dashboard#641
No description provided.