SPB Git

Repository Public

QYV-APP-062.json 5.3 KB 30 lines json

1{2  "id": "QYV-APP-062",3  "title": "Bitcoin Cash payments of coins that predate the splits of Bitcoin SV and eCash can be replayed on those chains",4  "severity": "medium",5  "cvss_vector": "CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:N",6  "cvss_score": 5.3,7  "cwe": "CWE-294",8  "masvs": "MASVS-CODE-4",9  "area": "wallet",10  "location": "Sources/QyvoraWallet/WalletService+Send.swift:485",11  "tool": "manual-review",12  "rule": "",13  "status": "fixed",14  "fix_commit": "0fe8b74",15  "regression_test": "QyvoraWalletTests.MainnetPolicyTests.aBitcoinCashPaymentOfOldCoinsTakesANewerCoinWithIt and bitcoinCashCoinsOlderThanAChainSplitRaiseACriticalWarning.",16  "description": "Bitcoin Cash's replay protection (SIGHASH_FORKID, fork id 0) separates it from Bitcoin. Bitcoin SV (split at block 556767, 2018-11-15) and eCash / XEC (split at block 661648, 2020-11-15) kept the same flag, fork id and digest: a Bitcoin Cash transaction whose inputs all exist on the other chain — coins that predate the split and were never mixed with coins created after it — is a valid transaction there and can be broadcast by anyone. Who is exposed: a user who restores into QYVORA a recovery phrase holding Bitcoin Cash from before November 2020 (or 2018) and who still holds the corresponding coins on eCash or Bitcoin SV; paying with those coins on Bitcoin Cash lets anyone move the coins of the other chain to the same recipient key. The wallet's own chain is protected; the exposure concerns assets of chains the wallet does not support, which is why the rating follows the CVSS band rather than the policy's \"replay across chains\" example (the lead or the owner may rate it otherwise). No wallet can prevent the replay of a valid transaction; it can only avoid building one (by adding an input that exists on Bitcoin Cash only) or tell the user.",17  "recommendation": "Mitigated in the service: the review of a Bitcoin Cash main-network payment whose coins were all confirmed at or before block 661647 carries the critical warning `bch.replayable-on-forks` (naming Bitcoin SV too when all are at or before 556766). Not covered: coins confirmed after a split that descend only from replayed transactions (the ancestry is not examined), and heights reported by a lying indexer. Proposed for a complete answer: a \"split coins\" action that sends the old coins to a fresh address of the wallet together with a coin created after the split, and the acknowledgement of the warning in the interface (QYV-APP-060).",18  "evidence": "Sources/QyvoraWallet/WalletService+Send.swift:549; Sources/QyvoraWallet/WalletService+Send.swift:672; App/Sources/Wallet/WarningAcknowledgement.swift:64",19  "fingerprint": "d06e2a0e327b",20  "reported": "2026-12-05",21  "owner": "review-utxo",22  "mitigation_commit": "3a937ad",23  "resolution_note": "The wallet now avoids building a replayable transaction when it can, and enforces the acknowledgement when it cannot. When the coins chosen for a Bitcoin Cash payment all predate the split from eCash, the service adds the smallest confirmed, unfrozen coin of the wallet created after the split (`replayProtectingCoin`): a transaction that spends a coin existing on Bitcoin Cash only is invalid on eCash and Bitcoin SV. The review says so (`bch.replay-protected`, information). When the wallet holds no such coin, or the user asked for exactly the selected coins (coin control), the critical warning `bch.replayable-on-forks` remains and the signature is refused by the service until it is acknowledged by its identifier (`signAndBroadcast(_:acknowledged:)`), which the review screen collects with one control per warning. Severity kept as rated; whether the policy example \"replay across chains\" applies (high) is still the owner's reading — the fix does not depend on it.",24  "residual_risk": "Heights are the indexer's: a source that reports old coins as recent removes the warning and the guard, one that reports recent coins as old adds a harmless input. A coin confirmed after the split that descends only from replayed transactions exists on both chains: the ancestry is not examined, so the guard coin may not protect in that case. A wallet holding only pre-split coins is warned, not protected: its first payment can be replayed; the change of that payment is a post-split coin and protects the following ones. The sweep of exposed coins carries no replay warning (it pays the wallet's own key on both chains; the fee is spent twice).",25  "verification": "Package tests of the whole root package on M5M36 (Swift 6.4, release, 895 tests in 23 runs, no failure) at commit f0ddca7; QyvoraWalletTests (212 tests) run five consecutive times on the laptop without failure after the last source change; application target compiled for iphoneos on M3U96a and for the simulator on the laptop; changed screens read on the simulator \"Qyvora iPhone B\" where the review record security/audit/review/multichain-app-screens.json says so; static checks and framework steps of the audit re-run. The final laptop run of the whole package and the quick audit were made after this register was written: their results are in the report of the work, not here.",26  "updated": "2026-12-05",27  "fixed": "2026-12-05",28  "previous_proposed_disposition": "Owner decision: accept the residual risk as documented (the wallet warns; replay on chains it does not support cannot be prevented), or add the split action before a public release."29}30
Files main
Menu

Theme