SPB Git

Repository Public

QYV-APP-002.json 4.6 KB 32 lines json

1{2  "id": "QYV-APP-002",3  "title": "Recovery-phrase reveal, private recovery sheet, backup export and signing need no fresh authentication",4  "severity": "medium",5  "cvss_vector": "CVSS:3.1/AV:P/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N",6  "cvss_score": 6.1,7  "cwe": "CWE-306",8  "masvs": "MASVS-AUTH-3",9  "area": "wallet",10  "location": "Sources/QyvoraWallet/WalletService+Onboarding.swift:257",11  "tool": "manual-review",12  "rule": "",13  "status": "fixed",14  "fix_commit": "28567b0",15  "regression_test": "QyvoraWalletTests.FreshAuthenticationTests (theWindowsAreTheDocumentedOnes, everySensitiveCallNeedsAFreshAuthentication, lockingAndClockTricksEndTheAuthentication, aWalletWithoutVaultIsNotAskedForACredential); AutoLockTests.neverAndLongDelaysAreRefusedAndOldProfilesAreBounded (lengthening the delay)",16  "description": "Root cause: the service gates `revealRecoveryPhrase`, `recoverySheet(includePrivateMaterial: true)`, `createBackup`, `createTransferPackage`, `signAndBroadcast…`, `signPSBT` and `signColdEthereumPayload` on `vault.isUnlocked` only; the comment on `revealRecoveryPhrase` delegates re-authentication to the caller and no screen implements it at the audited commit. Impact: anyone holding the unlocked device inside the auto-lock window (5 minutes by default) can read the recovery phrase or sign a transaction without knowing the password, the PIN or passing Face ID. Only `changePassword` and `rotateMasterKey` verify the password again.",17  "recommendation": "Make step-up authentication a property of the service: the sensitive calls take a credential (password, PIN, or a biometric unlock performed inside the call through the device slot) and verify it against the vault slot before releasing the secret or signing. At minimum for the phrase reveal and the private recovery sheet; for signatures, a per-signature Face ID check as the usage description of the application already announces. Add tests that the calls fail without the credential.",18  "evidence": "public func revealRecoveryPhrase()",19  "fingerprint": "0180964672c4",20  "frameworks": [21    "WSB-PHYS-005",22    "WSC-7.5",23    "MASVS-AUTH-3"24  ],25  "reported": "2026-12-04",26  "owner": "integrator",27  "fixed": "2026-12-04",28  "resolution_note": "Fixed: Step-up authentication is a property of the service: every successful `unlock` (password, PIN, biometrics), wallet creation, import, restore, password change and key rotation records the time on the monotonic clock, and the sensitive calls throw `WalletError.authenticationRequired` unless a credential was verified within `WalletService.authenticationWindow` (120 s) in the same boot session. Gated: `revealRecoveryPhrase`, `recoverySheet(includePrivateMaterial: true)`, `createBackup`, `createTransferPackage`, every signature (`withMasterKey`: `signAndBroadcastBitcoin`, `signPSBT`, `signAndBroadcastEthereum`, `signColdEthereumPayload`), `signMessage`, `rotateIdentity`, `disablePIN`, `disableBiometrics`, `setMainnetOptIn(true)`, `setEndpoints` / `resetEndpoints`, and a longer auto-lock delay; `enablePIN` and `enableBiometrics` within `setupAuthenticationWindow` (900 s). A lock, an auto-lock or the deletion of the wallet ends the authentication. Screens: the existing re-authentication sheet (a real unlock call) now also precedes switching mainnet on and saving endpoints, and the onboarding protection step asks again when the service says so. 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: `deleteWallet` is not gated by the service (the lock screen offers it to a user who lost every credential; the screen in the vault settings asks for re-authentication). `changePassword` and `rotateMasterKey` verify the password themselves. Within the two-minute window a second sensitive call needs no new credential at the service level; the screens ask each time. The per-signature Face ID check is the re-authentication sheet, not a Secure Enclave key bound to each signature.",29  "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.",30  "residual_risk": "`deleteWallet` is not gated by the service (the lock screen offers it to a user who lost every credential; the screen in the vault settings asks for re-authentication). `changePassword` and `rotateMasterKey` verify the password themselves. Within the two-minute window a second sensitive call needs no new credential at the service level; the screens ask each time. The per-signature Face ID check is the re-authentication sheet, not a Secure Enclave key bound to each signature."31}32
Files main
Menu

Theme