The Ledger
bitcoinjs-lib Fixes Two PSBT Bugs That Hid Miner Fees
Two high-severity bitcoinjs-lib flaws could make applications underestimate transaction fees in partially signed Bitcoin transactions. The advisories identify affected releases and patched versions across the v5, v6 and v7 lines.

Bitcoinjs-lib disclosed two high-severity flaws in PSBT fee accounting on October 26, 2026, warning that applications could approve transactions whose miner fees were far higher than their interfaces showed. The defects affect different cases: one lets conflicting records for an input mislead the fee calculation, while the other treats a finalized input with missing UTXO data as worth zero. The project’s advisories list fixes for the v5, v6 and v7 release lines.
Source github.com
A conflicting input can shrink the displayed fee
A partially signed Bitcoin transaction, or PSBT, can carry both a nonWitnessUtxo record containing the previous transaction and a witnessUtxo record containing an output’s script and value. In affected releases, signing uses the previous transaction while fee accounting can use the separate witness value without checking that it matches the referenced output. An imported or updated PSBT can therefore present one value to the signer and a smaller one to the fee calculator.
The advisory gives a demonstration using bitcoinjs-lib 7.0.1. The real input was worth 1,000,000,000 satoshi, while a false witness record listed 100,000,200 satoshi; against a 100,000,000-satoshi output, the actual fee was 900,000,000 satoshi. The library reported a 200-satoshi fee, the signature verified against the real input, and transaction extraction returned without the default fee-rate warning.
Missing UTXO data creates a second route
The separate advisory concerns finalized PSBT inputs that contain neither a witnessUtxo nor a nonWitnessUtxo. The fee calculator added an input’s value only when one of those records existed, so a finalized input without either record contributed zero instead of triggering an error. Because final scripts and witnesses do not reveal an input’s value, an application importing an already-signed PSBT could calculate a misleading fee without needing to sign that input again.
For its example, the advisory describes two valid inputs worth 10,000 and 90,000 satoshi, with only the first input’s UTXO record present, and outputs totaling 9,000 satoshi. The true fee is 91,000 satoshi, but the affected calculator reports 1,000 satoshi. The advisory says some incomplete combinations produce a negative fee and are rejected, but that does not prevent this case, where the known input still covers the outputs.
Patched releases and the limits of the risk
The advisories identify versions 5.2.0 through 5.2.1, 6.0.0 through 6.1.8, and 7.0.0-rc.0 through 7.0.3 as affected by the conflicting-record flaw. The missing-record issue also affects v5 releases from 5.1.0 through 5.2.1. Both advisories direct users to bitcoinjs-lib 5.2.2, 6.1.9 or 7.0.4 on the corresponding release line.
For conflicting records, the fix resolves previous outputs consistently across signing, validation and accounting, rejects disagreement between the witness record and referenced output, and clears cached fee and extracted-transaction data after relevant updates. Fee calculation now also requires a UTXO amount for every input. Applications that cannot upgrade should independently verify every referenced output and reject conflicting records before signing or trusting a displayed fee.
The advisories describe a risk to wallets and other applications that accept untrusted PSBTs and rely on bitcoinjs-lib’s fee calculation or fee-rate check. The flaws do not create signatures or send funds to the PSBT author; in the conflicting-record scenario, the excess becomes a miner fee. An actual loss requires a valid transaction to be broadcast and accepted by the network, so the concrete failure is a signing application that treats an understated fee as safe.
Sources
- Original source GitHub (bitcoinjs/bitcoinjs-lib) · page 1 github.com
Other pages read
- GitHub (bitcoinjs/bitcoinjs-lib) · page 2 github.com