←
raph1,630 posts
raph avatar

raph

@raphjaph

code sculptor and ordinal theorist

◷ Joined October 2021▧ 114 Photos and videos
Casey avatar
⟳ raph retweeted
Casey@rodarmor·Nov 11

I am very pleased to announce the release of filepack 0.0.12! Filepack is a content-addressed package format with structured metadata that aims to improve the user experience of decentralized file sharing. 🧵

Casey avatar
⟳ raph retweeted
Casey@rodarmor·Oct 19

Ord 0.29.1 is now available! A couple of notable changes: - Correctly deserialize Bitcoin Core RPC responses containing anchor outputs - New recursive endpoint `/r/block/<QUERY>` that returns the entire block Share and enjoy! github.com/ordinals/ord/rele…

raph avatar
raph@raphjaph·Aug 14

This is the equivalent of a bouncer checking your ID for holograms, special UV ink and correct microprints but then failing to check that the picture on the ID is actually you...

Critical vulnerability in the bip322 Rust crate: BIP-322 proofs for P2WPKH and P2SH-P2WPKH addresses could be forged with any attacker key. Full address-ownership bypass. Fixed in 0.0.11, affected versions yanked. If you verify Bitcoin address ownership, please upgrade now.

raph avatar
raph@raphjaph·Aug 14

Timeline (continued): - 08/02/26 @ 13:35: Maintainer acknowledges disclosure receipt - 08/02/26 @ 14:51: 0.0.11 released, 0.0.6-0.0.10 yanked from crates.io - 08/02/26: Private outreach to anyone using bip322 crate - 08/14/26: Public disclosure

raph avatar
raph@raphjaph·Aug 14

Timeline: - 08/22/24: Bug introduced while adding P2WPKH support - 07/28/26: Bug fixed incidentally as part of refactor to add multisig support (e8accbe) - 08/02/26 @ 11:24: Anonymous security researcher privately discloses bug to maintainers

raph avatar
raph@raphjaph·Aug 14

Remediation: upgrade to bip322 0.0.11 immediately. There is no workaround. Versions 0.0.6-0.0.10 are yanked from crates.io. GHSA + RustSec advisory filing in progress, so cargo audit will flag affected lockfiles.

raph avatar
raph@raphjaph·Aug 14

The fix (0.0.11): before any signature check, the scriptPubKey is derived from the witness pubkey - P2WPKH(HASH160(key)), P2SH-wrapped for the nested case - and must equal the claimed address's. Mismatch -> PublicKeyMismatch. Uncompressed keys rejected.

Post attachment
raph avatar
raph@raphjaph·Aug 14

Impact: pick any victim address + any message, build the BIP-322 challenge, sign with your own key -> accepted. No victim key, no interaction. App-level nonces don't help: the attacker signs the fresh challenge themselves. Complete "prove you own this address" bypass.

raph avatar
raph@raphjaph·Aug 14

This one's on me: pub_key is parsed in verify_full, passed into verify_full_p2wpkh, and the witness is rebuilt before the comparison, the two values look independent. The error is even named PublicKeyMismatch. It reads exactly like the check it was supposed to be.

raph avatar
raph@raphjaph·Aug 14

The missing step: nothing verified that the witness pubkey actually hashes to the claimed address. The signature was checked against the attacker's key, and the attacker produces the signature. Circular.

raph avatar
raph@raphjaph·Aug 14

The bug: the verifier read the public key from the user-supplied witness, then "checked" it against the same witness. pub_key WAS witness_pub_key. The check compared the key to itself. It could never fail.

Post attachmentPost attachment
raph avatar
raph@raphjaph·Aug 14

Affected: - P2WPKH: >= 0.0.6, < 0.0.11 - P2SH-P2WPKH: >= 0.0.7, < 0.0.11 - P2TR: not affected All four public APIs hit the same vulnerable path: verify_simple, verify_simple_encoded, verify_full, verify_full_encoded.

raph avatar
raph@raphjaph·Aug 14

Critical vulnerability in the bip322 Rust crate: BIP-322 proofs for P2WPKH and P2SH-P2WPKH addresses could be forged with any attacker key. Full address-ownership bypass. Fixed in 0.0.11, affected versions yanked. If you verify Bitcoin address ownership, please upgrade now.

Casey avatar
⟳ raph retweeted
Casey@rodarmor·Aug 5

Not to add further chaos to the timeline, but the degenerate runes gambling feature that I added in 0.28.0 can cause users to lose runes, so I just released 0.29.0 which reverts it. It was not a bug, per se, but a different kind of oversight 🧵 github.com/ordinals/ord/rele…