bitcoinjs-lib
Bitcoin transaction and PSBT library that hashes with SHA-256 and RIPEMD-160 and signs and verifies ECDSA and Taproot Schnorr signatures through a pluggable secp256k1 backend.
In short
What to know.
- Algorithms
- ECDSA on secp256k1, Schnorr signatures (BIP 340), SHA-2 (SHA-224, SHA-256, SHA-384, SHA-512), RIPEMD-1602 of 4 would be broken by a large quantum computer.
- Advisories
- 1 in the storeOSV last read 3 December 2026, 16:49 UTC.
- What to do
- Check your version against the advisories below. Each lists its affected and fixed versions. Plan a move away from ECDSA on secp256k1, Schnorr signatures (BIP 340) before large quantum computers exist.
1 in the store
Advisories
| Advisory | Id | Affected versions | Fixed in | Source's rating |
|---|---|---|---|---|
| bitcoinjs-lib: Undetected merkle node duplication in block root computation validates a forged transaction list | GHSA-8vv3-6qpc-gpw6 | from 2.3.0 before 5.2.1; from 6.0.0 before 6.1.8; from 7.0.0-rc.0 before 7.0.2 | Fixed in 5.2.1, 6.1.8, 7.0.2 | Rated Critical |
1 listed
Findings
| Finding | Id | Severity | Updated |
|---|---|---|---|
| bitcoinjs-lib: Undetected merkle node duplication in block root computation validates a forged transaction list | NMN-2026-0078 | Severity Critical | 3 December 2026 |
Reviewed 3 December 2026
Sources
- npm registry metadata for bitcoinjs-libregistry.npmjs.orgRetrieved 3 December 2026
- bitcoinjs-lib repositorygithub.comRetrieved 3 December 2026
Full record
- Package
- bitcoinjs-lib
- Ecosystem
- npm
- Role
- Toolkit
- Repository
- github.com/bitcoinjs/bitcoinjs-lib
- Status
- Not marked deprecated by its registry or maintainers.
- Reviewed
- Entry reviewed 3 December 2026. Catalogue entry, curated by hand and incomplete by design.
- Advisories read
- Last read from OSV 3 December 2026, 16:49 UTC
- Findings
- 1 listed above.
Algorithms it provides
- ECDSA on secp256k1 signatureClassical public keyBroken by Shor's algorithm
- Schnorr signatures (BIP 340) signatureClassical public keyBroken by Shor's algorithm
- SHA-2 (SHA-224, SHA-256, SHA-384, SHA-512) hashHashWeakened by Grover's search
- RIPEMD-160 hashHashWeakened by Grover's search
What a large quantum computer would change
- Broken by Shor's algorithmRests on factoring or discrete logarithms. A large fault-tolerant quantum computer running Shor's algorithm would break it.ECDSA on secp256k1, Schnorr signatures (BIP 340)
- Weakened by Grover's searchGrover's search would roughly halve its effective security. 256-bit keys and outputs stay adequate.SHA-2 (SHA-224, SHA-256, SHA-384, SHA-512), RIPEMD-160
Notes describe algorithm families, not any one project.