AI-generated analysisPublished automatically and not human-verified. Validated context appears in community notes below.
← Watch feed
High 73 Bitcoin

Validate wrapped-segwit redeem script contents

Public commit record

What the developer wrote

Authored by scgbckbone

78/100 · Adequate
Validate wrapped-segwit redeem script contents

Presence of the redeem script is not enough: the input is signed as
segwit based on the witness script, while witness_utxo_is_provably_segwit
decides amount trust from the redeem script field. A present-but-wrong
redeem script passed the new presence check yet still failed the
provably-segwit test, leaving the fee unverifiable with only a warning
before approval - the same unknown-fee hole as the missing case.

Require the redeem script to be exactly the P2WSH wrapper of the
witness script. Add regression test with a junk redeem script (verified
to reach the approval UX without this fix), and update the changelog.
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
The short version

What changed, and why it matters

This update tightens a recently added safety check in the COLDCARD firmware. For a specific type of Bitcoin address (P2SH-P2WSH), the device now verifies that the redeem script provided in the transaction data exactly matches the expected wrapper around the witness script. Previously, a malformed or junk redeem script could slip past the check, causing the device to sign the transaction while being unable to reliably verify the input amount and thus the fee. That could let an attacker trick a user into approving a transaction with a hidden or excessive fee.

Recommended action

Users should install a COLDCARD firmware release containing this commit before signing P2SH-P2WSH multisig transactions from untrusted PSBT sources. Wallet software that builds PSBTs for COLDCARD should ensure the redeem_script field is correctly populated with the P2WSH wrapper.

Security signals we found

01

Fixes incomplete validation of P2SH-P2WSH redeem scripts in PSBT signing

02

Prevents unknown-fee transaction approval when redeem script is present but incorrect

03

Adds regression test for junk redeem script reaching approval UX without the fix

04

Raises FatalPSBTIssue to abort signing rather than warn

05

Changelog explicitly describes the bugfix in security-relevant terms

Risk score

Why this scored 73/100

Our methodology →
Potential impact 22/30
Exploitability 16/25
Stealth signal 11/15
Affected reach 10/15
Confidence 9/10
Evidence quality 5/5
Human-validated context

Community notes

Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.

No validated notes yet.

The AI analysis stands alone for now. Submit a note if you can add evidence or important context.