Skip to content

Conversation

@emlun
Copy link
Contributor

@emlun emlun commented Jun 10, 2025

I recently got a prototype FIDO_2_2 authenticator and noticed that WebAuthn operations with it fails when userVerification: "required", or when residentKey: "required". I traced the root cause to the deserialization of AuthenticatorVersion, which is intolerant of unknown values such as "FIDO_2_2". This causes Firefox to downgrade to the CTAP1 protocol for any authenticator whose getInfo contains "FIDO_2_2" (or any other unknown value, such as future versions), preventing use of any CTAP2-exclusive features with those authenticators.

Reproducing the issue

  1. Launch Firefox 139.0 and open https://demo.yubico.com/webauthn-developers
  2. In “Authenticator selection”, uncheck “excludeCredentials” and set “userVerification” to “discouraged”. Click “CREATE” at the bottom and create a credential using a FIDO_2_2 authenticator. Observe that the credential registration succeeds.
  3. In “Authenticator selection”, change “userVerification to “required”. Again click “CREATE” at the bottom and create a credential using a FIDO_2_2 authenticator. Observe that the credential registration now fails.

Fixing the issue

This adds an AuthenticatorVersion::Unknown variant with #[serde(other)], causing unknown values to deserialize to that variant instead of being rejected. This is enough to prevent Firefox from downgrading FIDO_2_2 devices to CTAP1, so they can successfully use UV and other CTAP2-exclusive features.

This PR does not add a FIDO_2_2 variant since that would not actually add support for any features introduced in FIDO_2_2.

@emlun
Copy link
Contributor Author

emlun commented Jun 10, 2025

Copy link
Collaborator

@jschanck jschanck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@jschanck jschanck merged commit b440e57 into mozilla:ctap2-2021 Oct 22, 2025
8 checks passed
@emlun emlun deleted the unknown-authenticatorversion branch October 22, 2025 18:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants