High, CVSS 7.5MavenPublished
bitcoinj has a ScriptExecution P2PKH/P2WPKH Verification Bypass
CVE-2026-44714 · GHSA-hfcf-v2f8-x9pc
- Affected
- Maven org.bitcoinj:bitcoinj-core >= 0.15, < 0.17.1
- Fixed in
- 0.17.1· Vendor fix available
- Issue
- ScriptExecution.correctlySpends() contains two fast-path verification bugs for standard P2PKH and native P2WPKH spends in core/src/main/java/org/bitcoinj/script/ScriptExecution.java. In both branches, bitcoinj verifies an attacker-controlled signature/public-key pair but fails to verify that the public key is the one committed to by the output being spent. As a result, any attacker keypair can satisfy bitcoinj's local verification for arbitrary P2PKH and P2WPKH outputs. This doesn't affect the SPV (simple payment verification) trust model, as this model follows PoW and doesn't verify input signatures at all. Details The issue is in the optimized branches of ScriptExecution.correctlySpends(...). In the P2PKH fast path at core/src/main/java/org/bitcoinj/script/ScriptExecution.java:1042, the code: - parses the attacker-supplied signature from scriptSig - parses the attacker-supplied public key from scriptSig - computes the sighash against the victim output's scriptPubKey -…
Recommended action: Upgrade to 0.17.1 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.