Skip to content

Tolerate unknown AuthenticatorVersion values while deserializing #350

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: ctap2-2021
Choose a base branch
from

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

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.

1 participant