CVE-2026-44714: Bitcoinj core Bitcoinj Has A ScriptExecution P2PKH/P2WPKH Vulnerability

HIGH
Advisory Identifier: GHSA-hfcf-v2f8-x9pc
CVSS 7.5
CWE-347
Published
Advisory Summary

CVE-2026-44714 is a HIGH (CVSS 7.5) bitcoinj has a scriptexecution p2pkh/p2wpkh vulnerability (CWE-347: Improper Verification of Cryptographic Signature) affecting Bitcoinj core libraries in the Maven ecosystem. The issue involves bitcoinj has a scriptexecution p2pkh/p2wpkh verification bypass. Remediation is available by upgrading affected packages to version 0.17.1.

CVE-2026-44714 at a Glance

CVE Identifier CVE-2026-44714
GHSA Identifier GHSA-hfcf-v2f8-x9pc
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-347: Improper Verification of Cryptographic Signature
Affected Product Bitcoinj core
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 7.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity High (I:H)
Availability None (A:N)

How to Fix CVE-2026-44714

To remediate this vulnerability, upgrade all affected Bitcoinj core dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

org.bitcoinj:bitcoinj-core fixed: 0.17.1
<dependency>
    <groupId>org.bitcoinj</groupId>
    <artifactId>bitcoinj-core</artifactId>
    <version>0.17.1</version>
</dependency>
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

mvn dependency:tree -Dincludes=org.bitcoinj

How to Check if You Are Affected

To determine whether your Java application is affected by CVE-2026-44714, inspect your build dependencies using the Maven Dependency Plugin:

mvn dependency:tree -Dincludes=org.bitcoinj

Analyze the terminal output to locate any version of Bitcoinj core in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.17.1), your application is affected.

Note: The mvn dependency:tree -Dincludes=org.bitcoinj command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-347: Improper Verification of Cryptographic Signature, where the product does not verify, or incorrectly verifies, the cryptographic signature for data. In Bitcoinj core, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Summary `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` - checks only `pubkey.verify(sigHash, signature)` It never enforces the missing `P2PKH` binding: - `HASH160(pubkey) == ScriptPattern.extractHashFromP2PKH(scriptPubKey)` That means the `OP_DUP OP_HASH160 <hash> OP_EQUALVERIFY OP_CHECKSIG` semantics are not actually enforced in this fast path. Relevant code: ```java } else if (ScriptPattern.isP2PKH(scriptPubKey)) { if (chunks.size() != 2) throw new ScriptException(...); TransactionSignature signature; try { byte[] data = Objects.requireNonNull(chunks.get(0).data); signature = TransactionSignature.decodeFromBitcoin(data, true, true); } catch (SignatureDecodeException x) { throw new ScriptException(...); } ECKey pubkey = ECKey.fromPublicOnly(Objects.requireNonNull(chunks.get(1).data)); Sha256Hash sigHash = txContainingThis.hashForSignature(scriptSigIndex, scriptPubKey, signature.sigHashMode(), false); boolean validSig = pubkey.verify(sigHash, signature); if (!validSig) throw new ScriptException(...); } ``` In the native `P2WPKH` fast path at `core/src/main/java/org/bitcoinj/script/ScriptExecution.java:1023`, the bug is similar. The code: - reads the attacker-supplied pubkey from `witness` - builds `scriptCode` from that attacker pubkey with `ScriptBuilder.createP2PKHOutputScript(pubkey)` - computes the BIP143 sighash using that attacker-derived `scriptCode` - verifies the signature against the attacker pubkey It never enforces: - `HASH160(pubkey) == ScriptPattern.extractHashFromP2WH(scriptPubKey)` So for `P2WPKH`, the attacker controls both the pubkey and the `scriptCode` used for signing. Relevant code: ```java if (ScriptPattern.isP2WPKH(scriptPubKey)) { Objects.requireNonNull(witness); if (witness.getPushCount() < 2) throw new ScriptException(...); TransactionSignature signature; try { signature = TransactionSignature.decodeFromBitcoin(witness.getPush(0), true, true); } catch (SignatureDecodeException x) { throw new ScriptException(...); } ECKey pubkey = ECKey.fromPublicOnly(witness.getPush(1)); Script scriptCode = ScriptBuilder.createP2PKHOutputScript(pubkey); Sha256Hash sigHash = txContainingThis.hashForWitnessSignature(scriptSigIndex, scriptCode, value, signature.sigHashMode(), false); boolean validSig = pubkey.verify(sigHash, signature); if (!validSig) throw new ScriptException(...); } ``` Affected call sites include: - `core/src/main/java/org/bitcoinj/core/TransactionInput.java:546` - `core/src/main/java/org/bitcoinj/wallet/Wallet.java:4520` - `core/src/main/java/org/bitcoinj/signers/LocalTransactionSigner.java:84` - `core/src/main/java/org/bitcoinj/signers/CustomTransactionSigner.java:77` These call sites use `correctlySpends()` for transaction/input validation and pre-signing checks. Any application that treats a successful result from this path as proof that a spend is valid is affected. ### Fix The issue is fixed on the `release-0.17` branch via 2bc5653c41d260d840692bc554690d4d79208f9c, and on `master` via b575a682acf614b9ff95cacbdeb48f86c3ababe0. A 0.17.1 maintenance release has been made available on Maven Central.

CVE-2026-44714 Affected Bitcoinj core Versions

1 component(s)
Fixed Versions:
0.17.1
Product / Package Ecosystem Affected Versions Fixed Version
org.bitcoinj:bitcoinj-core
Maven
≥ 0.15
< 0.17.1
0.17.1

References

Frequently Asked Questions

What is CVE-2026-44714?
CVE-2026-44714 is a security vulnerability in Bitcoinj core involving bitcoinj has a ScriptExecution P2PKH/P2WPKH Verification Bypass under CWE-347: Improper Verification of Cryptographic Signature.
Which Bitcoinj core versions are affected?
Affected versions include releases prior to 0.17.1 across affected packages: org.bitcoinj:bitcoinj-core.
What version fixes CVE-2026-44714?
Upgrading to 0.17.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is bitcoinj-core affected?
Yes, org.bitcoinj:bitcoinj-core is affected in releases prior to 0.17.1. Upgrade your dependency to 0.17.1 or later.
What is the CVSS score of CVE-2026-44714?
CVE-2026-44714 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N.
What CWE is associated with CVE-2026-44714?
CVE-2026-44714 is classified under CWE-347: Improper Verification of Cryptographic Signature (The product does not verify, or incorrectly verifies, the cryptographic signature for data.).
How can I check Maven dependencies for CVE-2026-44714?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=org.bitcoinj'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-hfcf-v2f8-x9pc",
  "modified" : "2026-05-15T23:49:51Z",
  "published" : "2026-05-08T17:43:06Z",
  "aliases" : [ "CVE-2026-44714" ],
  "summary" : "bitcoinj has a ScriptExecution P2PKH/P2WPKH Verification Bypass",
  "details" : "### Summary\n`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`.\n\nIn 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.\n\nThis doesn't affect the SPV (simple payment verification) trust model, as this model follows PoW and doesn't verify input signatures at all.\n\n### Details\nThe issue is in the optimized branches of `ScriptExecution.correctlySpends(...)`.\n\nIn the `P2PKH` fast path at `core/src/main/java/org/bitcoinj/script/ScriptExecution.java:1042`, the code:\n\n- parses the attacker-supplied signature from `scriptSig`\n- parses the attacker-supplied public key from `scriptSig`\n- computes the sighash against the victim output's `scriptPubKey`\n- checks only `pubkey.verify(sigHash, signature)`\n\nIt never enforces the missing `P2PKH` binding:\n\n- `HASH160(pubkey) == ScriptPattern.extractHashFromP2PKH(scriptPubKey)`\n\nThat means the `OP_DUP OP_HASH160 <hash> OP_EQUALVERIFY OP_CHECKSIG` semantics are not actually enforced in this fast path.\n\nRelevant code:\n\n```java\n} else if (ScriptPattern.isP2PKH(scriptPubKey)) {\n    if (chunks.size() != 2)\n        throw new ScriptException(...);\n    TransactionSignature signature;\n    try {\n        byte[] data = Objects.requireNonNull(chunks.get(0).data);\n        signature = TransactionSignature.decodeFromBitcoin(data, true, true);\n    } catch (SignatureDecodeException x) {\n        throw new ScriptException(...);\n    }\n    ECKey pubkey = ECKey.fromPublicOnly(Objects.requireNonNull(chunks.get(1).data));\n    Sha256Hash sigHash = txContainingThis.hashForSignature(scriptSigIndex, scriptPubKey,\n            signature.sigHashMode(), false);\n    boolean validSig = pubkey.verify(sigHash, signature);\n    if (!validSig)\n        throw new ScriptException(...);\n}\n```\n\nIn the native `P2WPKH` fast path at `core/src/main/java/org/bitcoinj/script/ScriptExecution.java:1023`, the bug is similar. The code:\n\n- reads the attacker-supplied pubkey from `witness`\n- builds `scriptCode` from that attacker pubkey with `ScriptBuilder.createP2PKHOutputScript(pubkey)`\n- computes the BIP143 sighash using that attacker-derived `scriptCode`\n- verifies the signature against the attacker pubkey\n\nIt never enforces:\n\n- `HASH160(pubkey) == ScriptPattern.extractHashFromP2WH(scriptPubKey)`\n\nSo for `P2WPKH`, the attacker controls both the pubkey and the `scriptCode` used for signing.\n\nRelevant code:\n\n```java\nif (ScriptPattern.isP2WPKH(scriptPubKey)) {\n    Objects.requireNonNull(witness);\n    if (witness.getPushCount() < 2)\n        throw new ScriptException(...);\n    TransactionSignature signature;\n    try {\n        signature = TransactionSignature.decodeFromBitcoin(witness.getPush(0), true, true);\n    } catch (SignatureDecodeException x) {\n        throw new ScriptException(...);\n    }\n    ECKey pubkey = ECKey.fromPublicOnly(witness.getPush(1));\n    Script scriptCode = ScriptBuilder.createP2PKHOutputScript(pubkey);\n    Sha256Hash sigHash = txContainingThis.hashForWitnessSignature(scriptSigIndex, scriptCode, value,\n            signature.sigHashMode(), false);\n    boolean validSig = pubkey.verify(sigHash, signature);\n    if (!validSig)\n        throw new ScriptException(...);\n}\n```\n\nAffected call sites include:\n\n- `core/src/main/java/org/bitcoinj/core/TransactionInput.java:546`\n- `core/src/main/java/org/bitcoinj/wallet/Wallet.java:4520`\n- `core/src/main/java/org/bitcoinj/signers/LocalTransactionSigner.java:84`\n- `core/src/main/java/org/bitcoinj/signers/CustomTransactionSigner.java:77`\n\nThese call sites use `correctlySpends()` for transaction/input validation and pre-signing checks. Any application that treats a successful result from this path as proof that a spend is valid is affected.\n\n### Fix\nThe issue is fixed on the `release-0.17` branch via 2bc5653c41d260d840692bc554690d4d79208f9c, and on `master` via b575a682acf614b9ff95cacbdeb48f86c3ababe0. A 0.17.1 maintenance release has been made available on Maven Central.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.bitcoinj:bitcoinj-core"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.15"
      }, {
        "fixed" : "0.17.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/bitcoinj/bitcoinj/security/advisories/GHSA-hfcf-v2f8-x9pc"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-44714"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/bitcoinj/bitcoinj/commit/2bc5653c41d260d840692bc554690d4d79208f9c"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/bitcoinj/bitcoinj/commit/b575a682acf614b9ff95cacbdeb48f86c3ababe0"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/bitcoinj/bitcoinj"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/bitcoinj/bitcoinj/releases/tag/v0.17.1"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-347" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-05-08T17:43:06Z",
    "nvd_published_at" : "2026-05-15T17:16:47Z"
  }
}