Skip to content

Vaultwarden: WebAuthn assertion processed before signature verification allows persistent credential backup-flag tampering

Moderate
dani-garcia published GHSA-x7g7-cgx5-jhx2 Apr 25, 2026

Package

cargo vaultwarden (Rust)

Affected versions

<= 1.35.4

Patched versions

1.35.5

Description

Summary

Vaultwarden updates persistent WebAuthn credential metadata based on unverified authenticatorData before signature validation during the WebAuthn authentication flow.

An attacker who knows a user's password but cannot produce a valid WebAuthn signature can still permanently modify the stored backup_eligible and backup_state flags for that user's credential.

This can result in permanent denial of service of WebAuthn 2FA for affected credentials.

Details

In validate_webauthn_login()

check_and_update_backup_eligible(...);
let authentication_result =
    WEBAUTHN.finish_passkey_authentication(...)?;

check_and_update_backup_eligible() parses rsp.response.authenticator_data and updates the stored WebAuthn registration before calling finish_passkey_authentication()

The function extracts the Backup Eligible (BE) and Backup State (BS) flags directly from the unverified authenticatorData and persists them to the database.

However, finish_passkey_authentication() performs signature validation only afterward.

If signature verification fails, the database update is not rolled back.

PoC

  1. Use a normal user account with an existing WebAuthn credential already registered.
  2. Start a login that reaches the WebAuthn 2FA assertion step (so a login challenge state exists).
  3. Submit a WebAuthn assertion response where:
  • .rawId matches one of the user’s registered credentials, and
  • response.authenticatorData[32] (flags) is tampered to set BE=1 (and optionally toggle BS), but the signature is invalid (expected after tampering).
  1. Observe: authentication fails, but the server updates the stored credential metadata (backup_eligible/backup_state) before signature verification and persists it.

Impact

An authenticated user can cause a persistent DB update of their WebAuthn credential’s backup_eligible / backup_state metadata based on an unverified assertion response (i.e., even when signature verification fails), because the DB write occurs prior to finish_passkey_authentication().

Severity

Moderate

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
Network
Attack complexity
Low
Privileges required
Low
User interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
Low

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:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L

CVE ID

CVE-2026-31835

Weaknesses

Insufficient Verification of Data Authenticity

The product does not sufficiently verify the origin or authenticity of data, in a way that causes it to accept invalid data. Learn more on MITRE.

Credits