Repository Public
1{2 "id": "QYV-APP-001",3 "title": "Vault and backup passwords are not held to a minimum strength",4 "severity": "medium",5 "cvss_vector": "CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N",6 "cvss_score": 6.7,7 "cwe": "CWE-521",8 "masvs": "MASVS-AUTH-2",9 "area": "wallet",10 "location": "Sources/QyvoraWallet/WalletService+Onboarding.swift:88",11 "tool": "manual-review",12 "rule": "",13 "status": "fixed",14 "fix_commit": "04ebf03",15 "regression_test": "QyvoraWalletTests.CredentialPolicyTests (theFloorIsTenCharactersAndAFairEstimate, everyEntryPointOfTheServiceRefusesAWeakPassword); OnboardingTests.pinLockoutBiometricsAndAutoLock (weak new password refused)",16 "description": "Root cause: `WalletService.install` and `Vault.create` accept any non-empty password, `restore` any non-empty new password and `backupBytes` any non-empty backup password; `PasswordQuality.estimate` is computed only to be displayed. Impact: the password is the only secret between an attacker who obtains the vault file (device compromise, forensic extraction) or a backup file (stored wherever the user chose, possibly a cloud drive) and the recovery phrase. With a short password the Argon2id + PBKDF2 stretching (about a second per guess) does not prevent an offline search. Other locations: Sources/QyvoraVault/Vault.swift:231, Sources/QyvoraWallet/WalletService+Shield.swift:274, Sources/QyvoraWallet/WalletService+Shield.swift:327.",17 "recommendation": "Enforce a floor in the service, not only in the interface: refuse `createWallet`, `importWallet`, `changePassword`, `restoreBackup`, `createBackup` and `createTransferPackage` when `PasswordQuality.estimate(password).level` is below a documented level (and below a minimum length, e.g. 10 characters), with a typed `WalletError`. Add tests for the refusal on each entry point.",18 "evidence": "guard !password.isEmpty else",19 "fingerprint": "b7aa9065a768",20 "frameworks": [21 "WSC-3.3",22 "WSC-7.4",23 "WSB-PHYS-002~Mobile",24 "MASVS-AUTH-2",25 "MASVS-STORAGE-1"26 ],27 "reported": "2026-12-04",28 "owner": "integrator",29 "fixed": "2026-12-04",30 "resolution_note": "Fixed: `WalletService.passwordRejection` is the single rule, enforced by the service with the typed error `WalletError.weakPassword`: at least 10 characters and a `PasswordQuality` estimate of 'fair' (45 bits) or more. It is applied by `createWallet`, `importWallet`, `changePassword`, `restoreBackup`, `completeTransferReception` (new vault password) and by `createBackup` and `createTransferPackage` (backup password), before anything is derived, opened or created. The forms show the same sentence. Verification: package tests on M4M64c (Swift 6.3.3, release) and on the laptop (Swift 6.4, release); application target compiled for iphoneos on M3U96a. Residual risk: The estimate is a heuristic (length x alphabet with penalties for common words, repetitions, sequences, keyboard walks and years): it refuses the passwords tried first, it does not measure real guessing entropy. `Vault.create` itself still accepts any non-empty password: the floor is a rule of the wallet service, which is the only caller in the application.",31 "verification": "package tests on M4M64c (Swift 6.3.3, release) and on the laptop (Swift 6.4, release); application target compiled for iphoneos on M3U96a.",32 "residual_risk": "The estimate is a heuristic (length x alphabet with penalties for common words, repetitions, sequences, keyboard walks and years): it refuses the passwords tried first, it does not measure real guessing entropy. `Vault.create` itself still accepts any non-empty password: the floor is a rule of the wallet service, which is the only caller in the application."33}34