`@bsv/wallet-toolbox` / `-client` / `-mobile` don't verify storage-supplied recipient output scripts against caller-requested outputs in createAction
Reported by @echennells (Eric Chennells). Migrated from public issue #191 to a private advisory.
Affected: @bsv/wallet-toolbox / -client / -mobile. Verified in 2.1.21 and 2.1.21-parity-fix.2; the relevant code is the same at current HEAD
Summary:
When createAction runs against a remote StorageClient, the storage server returns the outputs to build. buildSignableTransaction takes each non-change output's lockingScript from the storage response and signs it, without comparing it to the lockingScript the caller supplied in args.outputs. WalletPermissionsManager.createAction parses the built transaction and has args.outputs available, but uses the tx only for inputs and getFee(); it does not inspect tx.outputs. A storage provider that returns a different recipient script than requested will therefore have that script signed and broadcast, while the calling app and UI still show the originally requested recipient.
Relevant code:
signer/methods/buildSignableTransaction.js— non-change outputlockingScript = asBsvSdkScript(out.lockingScript), sourced from the storage response;args.outputsis not consulted.WalletPermissionsManager.jscreateAction— parses the built tx, derives spend fromargs.outputssatoshis +tx.getFee(), readstx.inputs; does not readtx.outputs.signer/methods/signAction.js,completeSignedTransaction.js— sign the as-built tx; no output comparison.
Context:
Remote storage is a supported, default configuration (StorageClient over BRC-103 AuthFetch, default endpoint storage.babbage.systems, optional payment middleware). The mutual auth establishes the storage server's identity and protects the channel, but the contents it returns are not validated against the request. The attacker is the storage operator, or anyone who compromises it — not a passive network MITM. (StorageServer.processAction does compare the signed rawTx outputs to what storage stored, so a response-only MITM is rejected; an operator stores the substituted script from the start.)
Proof of concept: We ran a storage server that returns a substituted recipient output, and pointed a current yours-wallet build at it as its active storage provider. With the wallet otherwise unmodified, a payment requested to one address was built, signed, and broadcast paying a different address, the substitution was not surfaced anywhere in the wallet.
Affected software
Click a technology to see all vulnerabilities affecting it.
| Platform | Package | Vulnerable versions | Fixed in |
|---|---|---|---|
| npm package | @bsv/wallet-toolbox | >= 1.1.47, < 2.4.0 | 2.4.0 |
| npm package | @bsv/wallet-toolbox-client | >= 1.1.47, < 2.4.0 | 2.4.0 |
| npm package | @bsv/wallet-toolbox-mobile | >= 1.3.21, < 2.4.0 | 2.4.0 |
References
- https://github.com/bsv-blockchain/ts-stack/security/advisories/GHSA-36f9-7rg5-cpf8
- https://nvd.nist.gov/vuln/detail/CVE-2026-56744
- https://github.com/bsv-blockchain/ts-stack/commit/3a11f6111919245a3090e9f3895cfc4f21a80d28
- https://github.com/bsv-blockchain/ts-stack/commit/5492cabbef4ddc7f60cc49cdf5d8c74ed2e5d949
- https://github.com/bsv-blockchain/ts-stack/commit/5ee60395e78e8b822d9a78efeacc6039c249819b
- https://github.com/bsv-blockchain/wallet-toolbox/commit/ca651b067c0238cd8b1ddd3af225daa503857a07
- https://github.com/bsv-blockchain/ts-stack
- CVSS vector
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N- Weakness (CWE)
CWE-1288- Platform
- npm
- Package
@bsv/wallet-toolbox, @bsv/wallet-toolbox-client, @bsv/wallet-toolbox-mobile- Disclosed
- 24.09.2026
- Updated
- 11.10.2026 10:22
Sources and licenses
OSV / GitHub Advisory Database - GHSA-36f9-7rg5-cpf8 - CC BY 4.0
Vulnerability history: @bsv/wallet-toolbox
All published vulnerabilities of this package (npm package), newest first. Shows whether this is a one-off slip or a package that needs watching.
This is the only known vulnerability of this package.
Know which vulnerabilities affect your application
With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.