Intel

AIKIDO-2026-810898

bip322 is vulnerable to Improper Verification of Cryptographic Signature

Improper Verification of Cryptographic SignatureGHSA-5chw-87w3-j9cv Published 4 days ago

91

Critical Risk

This Affects:

RUSTbip322
0.0.6 - 0.0.10
Fixed in 0.0.11
Are you affected? Scan for Free

TL;DR

The bip322 crate verifies BIP-322 message signatures for Bitcoin addresses. For P2WPKH and P2SH-P2WPKH addresses, the verifier reads the public key from the caller-supplied witness and compares that key against itself, so it never confirms the key hashes to the claimed address. A proof signed with an unrelated private key is therefore accepted as valid ownership of any victim P2WPKH or P2SH-P2WPKH address, allowing an authentication bypass. The fix derives the expected scriptPubKey from the witness public key and requires it to match the claimed address before the signature is checked.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and you rely on verify_simple, verify_simple_encoded, verify_full, or verify_full_encoded to prove ownership of a P2WPKH or P2SH-P2WPKH address.

Background info

bip322 is vulnerable to Improper Verification of Cryptographic Signature in versions 0.0.6 - 0.0.10.

How to fix this

Upgrade the bip322 library to the patch version.