Repository Public
1{2 "id": "QYV-SVC-064",3 "title": "PSBT amounts were not authenticated where signatures do not commit to them (Dogecoin, Bitcoin Cash, BIP-44 accounts)",4 "severity": "medium",5 "cvss_vector": "",6 "cvss_score": null,7 "cwe": "CWE-345",8 "masvs": "MASVS-CODE-4",9 "area": "bitcoin",10 "location": "Sources/QyvoraBitcoin/Account.swift:407",11 "tool": "manual-review",12 "rule": "",13 "status": "fixed",14 "fix_commit": "3996ed6",15 "regression_test": "QyvoraBitcoinTests.UTXOCoinsAuditRegressionTests/aPreviousTransactionSetThroughThePropertyIsAuthenticated, nothingIsSignedWhenTheFeeIsNotAuthenticated; property psbtPreviousTransactionsAuthenticateTheFee; fuzz target psbt-prevtx",16 "description": "Root cause, three parts. (1) `UTXOAccount.sign(psbt:)` skipped an input that carried no UTXO record and signed the account's other inputs. With the original digest (Dogecoin, legacy inputs) a signature commits to no amount: a PSBT showing input A with its previous transaction and hiding input B gets A signed; a second PSBT gets B signed; together they spend both coins for a fee nobody was shown (two-round fee burn). (2) `PSBT.fee` under Dogecoin's scheme was computed from a PSBT_IN_WITNESS_UTXO record when an input had no previous transaction — an amount nothing authenticates. (3) `PSBT.spentOutput` trusted a previous transaction placed through the public `inputs` property without recomputing its identifier (parsing and the setter did check), and indexed the transaction's inputs with an index bounded only by the PSBT's own list. Reachability: the wallet service does not expose PSBTs for these coins (cold signing answers `featureUnavailable`), so the defect was latent in the engine's public interface; had the service used it as is, the impact would have been a fee burn, hence the rating. No CVSS vector.",17 "recommendation": "Fixed: `spentOutput` returns nothing unless the previous transaction hashes to the outpoint and the index is in range; `fee` is nil under Dogecoin's and Bitcoin Cash's schemes unless every input carries its previous transaction; the account refuses a PSBT with a mismatching previous transaction and, on those networks and for BIP-44 accounts, signs only when every input has an authenticated previous transaction and the fee is known.",18 "evidence": "",19 "fingerprint": "31d249fbaf97",20 "reported": "2026-12-05",21 "owner": "review-utxo"22}23