What changed, and why it matters
This commit removes a single line that automatically added witness UTXO data to SegWit inputs when decoding a PSBT. The change is titled 'Preserve imported PSBTs,' suggesting the previous behavior was modifying user-supplied transaction data in an unwanted way. Without more context, it is unclear whether this is a security fix or a functional/data-integrity change. The removed operation could, in some PSBT workflows, alter the information a hardware wallet or signer sees, which can affect how transactions are validated or signed.
Treat as a low-confidence signal requiring further review. Audit the WalletPSBTViewModel and surrounding PSBT handling to confirm whether removing AddWitnessUtxoToSegwitInputs() could cause signers to fall back to non-witness UTXO data, and verify that all downstream PSBT validation, signing, and fee-checking logic still behaves correctly. If this change fixes a reported security issue, request the vendor or reporter to publish an advisory.
Security signals we found
PSBT mutation behavior changed
Witness UTXO data no longer auto-injected for SegWit inputs
Potential data-integrity / non-repudiation consideration for imported PSBTs
No explicit security language in commit title or message
Evidence from the diff
In WalletPSBTViewModel.cs, the call to psbt.AddWitnessUtxoToSegwitInputs() was removed. This NBitcoin extension method populates the witness UTXO (the previous output script and amount) for SegWit inputs in a PSBT. The commit title implies the intent is to stop mutating imported PSBTs and keep them as originally provided. Removing automatic witness-UTXO injection could prevent the view model from overriding or supplementing data the user/caller explicitly supplied, which matters for PSBT signers that rely on exact input fields. However, the diff alone does not show an exploitable vulnerability; it only shows a behavioral change that may have security relevance in PSBT parsing/signing workflows.
Changed components
BTCPayServer/Plugins/Wallets/Views/ViewModels/WalletPSBTViewModel.csWallet PSBT decode/import view modelPSBT processing pipeline for wallet pluginInspect captured patch +0 / −1
diff --git a/BTCPayServer/Plugins/Wallets/Views/ViewModels/WalletPSBTViewModel.cs b/BTCPayServer/Plugins/Wallets/Views/ViewModels/WalletPSBTViewModel.cs
index 5b5816c..5a71b52 100644
--- a/BTCPayServer/Plugins/Wallets/Views/ViewModels/WalletPSBTViewModel.cs
+++ b/BTCPayServer/Plugins/Wallets/Views/ViewModels/WalletPSBTViewModel.cs
@@ -42,7 +42,6 @@ namespace BTCPayServer.Plugins.Wallets.Views.ViewModels
var psbt = await GetPSBTCore(network, modelState);
if (psbt != null)
{
- psbt.AddWitnessUtxoToSegwitInputs();
Decoded = psbt.ToString();
PSBTHex = psbt.ToHex();
PSBT = psbt.ToBase64();
Why this scored 35/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.