Skip to content

[Passkeys] When UV is required, KeePassXC must request user verification or not handle the request #10406

@timcappalli

Description

@timcappalli

Overview

In WebAuthn, there are 3 modes for user verification that an RP can request: required, preferred, and discouraged.

https://www.w3.org/TR/webauthn-2/#enum-userVerificationRequirement

When required, the authenticator must perform user verification (PIN, biometric, or some other unlock mechanism). If this is not possible, the authenticator should not handle the request.

When preferred, the authenticator should try its best to perform user verification (e.g. if a biometric sensor is available or a PIN is set), but may choose not to in the interest of a better user experience. In this case, the request can succeed, but UV must be returned as false / 0.

When discouraged, the authenticator should not perform user verification and return UV = false/0

Steps to Reproduce

Note

These apply to both creation and authentication flows.

Scenario 1 (UV=Required)

  1. Go to WebAuthn.io and select UV required in the configuration, start the flow
  2. KeepPassXC asks you to confirm
  3. WebAuthn promise resolved, request successful (UV=1 in authData)

Scenario 2 (UV=Preferred)

  1. Go to WebAuthn.io and select UV required in the configuration, start the flow
  2. KeepPassXC asks you to confirm
  3. WebAuthn promise resolved, request successful (UV: true/1 in authData)

Expected Behavior

Scenario 1 (UV=Required)

  1. Go to WebAuthn.io and select UV required in the configuration, start the flow
    2a. If KeePassXC does not have the capability to do UV, the request should be aborted
    2b. If KeePassXC has the capability to do UV, request UV, and if successful, continue
    3a. n/a
    3b. WebAuthn promise resolved, request successful (UV: true/1 in authData)

Scenario 2 (UV=Preferred)

  1. Go to WebAuthn.io and select UV preferred in the configuration, start the flow
    2a. If KeePassXC does not have the capability to do UV or the KeePass believe the UX will be poor based on available context (e.g. bio sensor available), continue the request
    2b. If KeePassXC has the capability to do UV and KeePassXC believes it is a good UX for the user based on context (e.g. bio sensor available, PIN set, etc), request UV, and if successful, continue
    3a. WebAuthn promise resolved, request successful (UV: false/0 in authData)
    3b. WebAuthn promise resolved, request successful (UV: true/1 in authData)

Actual Behavior

This implementation is not spec compliant and has the potential to be blocked by relying parties.

Context

KeePassXC - Version 2.7.7
Revision: 68e2dd8

Qt 5.15.11
Debugging mode is disabled.

Operating system: macOS 14.4
CPU architecture: arm64
Kernel: darwin 23.4.0

Enabled extensions:

  • Auto-Type
  • Browser Integration
  • Passkeys
  • SSH Agent
  • KeeShare
  • YubiKey
  • Quick Unlock

Cryptographic libraries:

  • Botan 3.1.1

Activity

changed the title [-][Passkeys] When UV is required, KeePassXC must request user verification or abort the request[/-] [+][Passkeys] When UV is required, KeePassXC must request user verification or not handle the request[/+] on Mar 13, 2024
timcappalli

timcappalli commented on Mar 13, 2024

@timcappalli
Author

This should be tagged as a security issue as well.

droidmonkey

droidmonkey commented on Mar 13, 2024

@droidmonkey
Member

I'm confused why an unlocked database and the user confirm a prompt does not constitute verification. If the user's database is unlocked, showing a prompt to "further unlock/prove access" is rather irrelevant.

Users that desire more security in this aspect can either manually lock their database or set a short timeout for locking. That would require them to use quickunlock (pin/bio) or their full credentials prior to using passkeys.

timcappalli

timcappalli commented on Mar 13, 2024

@timcappalli
Author

Confirming a prompt would be User Presence, which is always required. For both UP and UV, WebAuthn requires that the gesture occur during the ceremony itself. A vault could have been unlocked 8 hours ago and the user stepped away after 1 hour.

If the user's database is unlocked, showing a prompt to "further unlock/prove access" is rather irrelevant.

Users are quite used to using their biometric or PIN to authorize a sign in or transaction. This is a standard pattern across the ecosystem.

droidmonkey

droidmonkey commented on Mar 13, 2024

@droidmonkey
Member

A vault could have been unlocked 8 hours ago and the user stepped away after 1 hour.

Yet their database is still unlocked. Which means (since you are assuming an attacker scenario here) I can simply copy your passkey data (and everything else) from your database and do an auth on my own terms. After all, this is entirely client side reported compliance, and the RP has absolutely no way to verify/validate this ever happened.

What I am saying is we have a mechanism to do user verification that actually matters, and that involves locking your database when you aren't using it.

This implementation is not spec compliant and has the potential to be blocked by relying parties.

How can relying parties even know? It's just a self reported boolean value.

timcappalli

timcappalli commented on Mar 13, 2024

@timcappalli
Author

What I am saying is we have a mechanism to do user verification that actually matters, and that involves locking your database when you aren't using it.

Then you should require its use when passkeys are enabled

How can relying parties even know? It's just a self reported boolean value.

You are identifying yourself to relying parties, and you have a passkey provider that is known to not be spec compliant.

varjolintu

varjolintu commented on Mar 13, 2024

@varjolintu
Member

Users are quite used to using their biometric or PIN to authorize a sign in or transaction. This is a standard pattern across the ecosystem.

Do other desktop password managers do this? As far as I know, they are also just confirming these actions with a simple popup.

timcappalli

timcappalli commented on Mar 13, 2024

@timcappalli
Author

Do other desktop password managers do this? As far as I know, they are also just confirming these actions with a simple popup.

All native passkey providers behave as defined in the specification w.r.t. to UP and UV, and a majority of third party providers are responding truthfully about UV.

varjolintu

varjolintu commented on Mar 13, 2024

@varjolintu
Member

Do other desktop password managers do this? As far as I know, they are also just confirming these actions with a simple popup.

All native passkey providers behave as defined in the specification w.r.t. to UP and UV, and a majority of third party providers are responding truthfully about UV.

This includes all password managers that are using passkeys via their own browser extension, including Dashlane, Bitwarden etc.?

droidmonkey

droidmonkey commented on Mar 13, 2024

@droidmonkey
Member

You are identifying yourself to relying parties, and you have a passkey provider that is known to not be spec compliant.

What stops us, or anyone else, from simply changing the self reported, self generated AAGUID? There is no passkey certification process, no signed stamp of approval from on high. RP's blocking arbitrary AAGUIDs doesn't seem like a thing that's going to happen or that can even make a difference. Get blocked change the GUID. Maybe even present a random one every time.

At the end of the day, this is all client side reported information with absolutely zero validation capability by the RP. So, to me, this is a user choice. Do I use keepassxc and accept their security model (lock your database dangit) or use another authenticator.

timcappalli

timcappalli commented on Mar 13, 2024

@timcappalli
Author

What stops us, or anyone else, from simply changing the self reported, self generated AAGUID?

AAGUIDs for synced passkey providers are currently only designed to be used for UX in RP account management screens, but nothing is stopping an RP from using it for other restrictions.

There is no passkey certification process

This is currently being defined and is almost complete.

no signed stamp of approval from on high

see above. Once certification and attestation goes live, there will be a minimum functional and security bar for providers.

RP's blocking arbitrary AAGUIDs doesn't seem like a thing that's going to happen or that can even make a difference

It does happen and will continue to happen because of non-spec compliant implementations and authenticators with poor security posture.

So, to me, this is a user choice.

Sure, I guess it is always a user choice. But as technologists, its important to build products that help users be secure by default and which play nicely in a standards-based ecosystem.

At the end of the day, it is your product. You do you. I've taken a lot of my personal time to point out some things that should be addressed, things that are huge sticking points for the ecosystem over this 3+ year journey.

droidmonkey

droidmonkey commented on Mar 13, 2024

@droidmonkey
Member

I want to clarify myself, I am definitely not saying user verification isn't important nor do we not want to support it. We technically do support it with a locked database. I am playing devil's advocate on how the spec is requiring things to happen and there can technically be no way to know that besides this conversation or a very curious user who knows the spec.

I am for an option (perhaps enabled by default) that requires entering the database credentials again, even if the database is unlocked.

Good to hear there will be a cert process, I hope it is not too expensive 😄 I already pay $350 a year for the pleasure of signing my windows builds.

20 remaining items

droidmonkey

droidmonkey commented on Apr 27, 2024

@droidmonkey
Member

Physical or remote access to an unlocked computer and database, which the scenario presented assumes.

You can read a comprehensive dialog about requiring credentials prior to export or other similar action and why that is total security theatre: #9339

pamperer562580892423

pamperer562580892423 commented on Apr 29, 2024

@pamperer562580892423

A vault could have been unlocked 8 hours ago and the user stepped away after 1 hour.

Yet their database is still unlocked. Which means (since you are assuming an attacker scenario here) I can simply copy your passkey data (and everything else) from your database and do an auth on my own terms. After all, this is entirely client side reported compliance, and the RP has absolutely no way to verify/validate this ever happened.

What I am saying is we have a mechanism to do user verification that actually matters, and that involves locking your database when you aren't using it.

As a normal user... about unlocked database in KeePassXC... I think you are aware of it, but maybe it is a bit risky, that the user is able to see the passkey data. I also use Bitwarden and I only see "a passkey is there" - and not the data behind it (let alone being able to manipulate the passkey-data itself). But in KeePassXC you could delete part of the passkey, edit parts of the passkey, copy the values... and when my database is unlocked, everyone else could do the same (of course, unlocked databases in and of itself are an error when leaving the computer - and this was and still is the same for every password in the database, so not a new "problem")... But still, I wonder whether this is as secure as it should be. 🤔

droidmonkey

droidmonkey commented on Apr 29, 2024

@droidmonkey
Member

We are not in the business of obfuscating or hiding data from the end user. Our users are generally sophisticated and aware of security practices. If they are not, then they won't likely be looking in the advanced tab anyway.

Hunterrules0-0

Hunterrules0-0 commented on Apr 29, 2024

@Hunterrules0-0
pamperer562580892423

pamperer562580892423 commented on Apr 29, 2024

@pamperer562580892423

We are not in the business of obfuscating or hiding data from the end user.

@droidmonkey Thanks for your reply! And understandable, too. - But how about some "middleground" in the long run? Not "obfuscating and hiding", but maybe at least require to re-enter your master password to be able to watch/edit/etc. passkey-data? So that there is one more security measure to/before "full passkey-access".

Our users are generally sophisticated and aware of security practices. If they are not, then they won't likely be looking in the advanced tab anyway.

You have not met my father. When something doesn't work, he would open every tab and try a click here and there... ;-)

pamperer562580892423

pamperer562580892423 commented on Apr 29, 2024

@pamperer562580892423

PS: Ah, and possible re-entering of the master password, not only as a security measure against a "possible stranger", but also for the user itself, so that mistakenly manipulating with the data of a passkey (and rendering it useless thereby "by accident") is less likely... and BTW, I think you can't only think of the experts, only doing what is right at every turn, but also the beginner level user, who can damage a lot by trying silly things and maybe recognizing it four months later, when "something suddenly doesn't work"...

benjuade

benjuade commented on Jul 30, 2025

@benjuade

According to this source, at the moment no passkey providers with a browser extension are performing UV in a spec-compliant manner.

varjolintu

varjolintu commented on Jul 30, 2025

@varjolintu
Member

According to this source, at the moment no passkey providers with a browser extension are performing UV in a spec-compliant manner.

According to the issue text "This implementation is not spec compliant and has the potential to be blocked by relying parties." maybe all browser extensions providing passkeys will be blocked eventually? ;)

benjuade

benjuade commented on Jul 30, 2025

@benjuade

According to this source, at the moment no passkey providers with a browser extension are performing UV in a spec-compliant manner.

According to the issue text "This implementation is not spec compliant and has the potential to be blocked by relying parties." maybe all browser extensions providing passkeys will be blocked eventually? ;)

It may be possible if they do not implement UV despite sending the flag to true. Apart from this, if a platform requires UV it may be great that the password manager does some sort of verification (even a PIN configured in the Extension) may be great.

zchrykng

zchrykng commented on Aug 22, 2025

@zchrykng

Personally, I'd rather switch back to username, password, and 2FA token over passkeys if companies start enforcing this. And any sites that don't allow that, I can live without.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @johnmaguire@phoerious@zchrykng@droidmonkey@danShumway

        Issue actions