Passkey session identifiers could collide with shared cache entries
Description
Passkey completion endpoints accepted a client-supplied session identifier and used it directly as a key in Nginx UI's shared in-memory cache. Some passkey flows stored temporary WebAuthn session data under bare UUID keys, while other subsystems used predictable keys in the same cache. A crafted identifier could consume an entry owned by another subsystem and reach an unsafe type assertion.
The unauthenticated passkey-login completion flow made the collision primitive remotely reachable when passkeys were enabled. Other passkey and two-factor completion paths had the same untyped cache-access pattern but required their normal authentication context.
Impact
An unauthenticated attacker could target a predictable shared cache key, remove the cached value, and trigger a recovered type-confusion panic. Targeting the cached login-crypto parameters could temporarily disrupt password-login attempts until the parameters were regenerated. No confidentiality or persistent integrity impact was demonstrated.
Remediation
Each temporary authentication flow now uses an explicit cache namespace, including passkey login, passkey registration, passkey pre-authentication, secure-session passkey verification, and two-factor login. Client-provided session identifiers must be canonical UUIDs before lookup, and cached values are checked with safe type assertions. Invalid, missing, expired, or wrong-type entries fail closed as an unknown session.
The namespaces only separate server-side challenge state. They do not add an authentication round trip or shorten the existing secure-session lifetime.
Fixed by d766e90bb824f1d0dcc98401a412ef954dfd31c5.