Skip to content

fido: pinUvAuthToken retains acfg after UP-gated operations

Low
TheMaxMur published GHSA-wqjm-653g-hgw3 Jul 24, 2026

Package

cargo RS-Key (Rust)

Affected versions

< 0.4.0

Patched versions

0.4.1

Description

Summary

A pinUvAuthToken retains all requested permissions after a successful
user-presence-gated makeCredential or getAssertion operation.

CTAP 2.1 requires clearing all token permissions except lbw after an
operation tests user presence. As a result, a token containing
mc|ga|acfg can perform a touch-gated registration and then immediately
use authenticatorConfig with acfg without another touch.

Details

FidoState::mark_token_used() at crates/rsk-fido/src/state.rs:359
only refreshes last_used_ms; it does not clear permissions.

It is called during token validation from:

  • makecredential.rs:451
  • getassertion.rs:362

The actual presence checks happen later in the successful operation paths.
After those checks, the implementation does not apply the equivalent of
clearPinUvAuthTokenPermissionsExceptLbw().

authenticatorConfig accepts the remaining acfg permission without a
presence check for regular subcommands such as toggleAlwaysUv and
enableEnterpriseAttestation.

CTAP 2.1 reference:

https://fidoalliance.org/specs/fido-v2.1-ps-20210615/fido-client-to-authenticator-protocol-v2.1-ps-20210615.html#pinuvauthprotocol-clearpinuvauthtokenpermissionsexceptlbw

PoC

Prerequisites:

  • A device with a configured PIN.
  • A valid protocol-two pinUvAuthToken obtained with permissions
    mc|ga|acfg (0x23).
  • A valid pinUvAuthParam for the requested operation.
  1. Obtain the multi-permission token.
  2. Send authenticatorMakeCredential with the token and up implicitly
    true.
  3. Complete the requested physical presence check.
  4. Reuse the same token to send authenticatorConfig with
    toggleAlwaysUv or enableEnterpriseAttestation.
  5. The configuration command succeeds without another physical presence
    check.

Expected behavior: after step 3, the token permissions are reduced to
lbw (or zero if lbw was not requested), and step 4 fails with
CTAP2_ERR_PIN_AUTH_INVALID.

Impact

A host that holds a valid multi-permission token can carry an
acfg authorization across a user-presence-gated FIDO operation and
modify security-relevant authenticator configuration without the
additional presence boundary required by CTAP 2.1.

This is not unauthenticated: obtaining the token still requires the
appropriate PIN/UV authorization.

AUT_ENABLE and AUT_DISABLE have their own touch checks, so the
no-second-touch impact specifically applies to regular configuration
subcommands such as toggleAlwaysUv and enableEnterpriseAttestation.

Suggested fix: after the successful UP check, retain only:

  ctx.state.paut.permissions &= PERM_LBW;

For getAssertion, use the raw up request value; for makeCredential,
UP is implicitly true. The mask should be applied after the successful
presence check, not immediately after mark_token_used().

Severity

Low

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Local
Attack complexity
Low
Privileges required
Low
User interaction
Required
Scope
Unchanged
Confidentiality
None
Integrity
Low
Availability
None

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:N/I:L/A:N

CVE ID

No known CVE

Weaknesses

Insufficient Session Expiration

According to WASC, Insufficient Session Expiration is when a web site permits an attacker to reuse old session credentials or session IDs for authorization. Learn more on MITRE.

Incorrect Authorization

The product performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check. Learn more on MITRE.

Credits