AI-generated analysisPublished automatically and not human-verified. Validated context appears in community notes below.
← Watch feed
Moderate 62 Bitcoin

Reject non-pushnum opcodes in multisig pattern

Public commit record

What the developer wrote

Authored by Abeeujah

68/100 · Adequate
Reject non-pushnum opcodes in multisig pattern

When checking whether a script is a multisig, opcodes that are not push
numbers (e.g. OP_RESERVED) in the pubkey count position were incorrectly
treated as valid. Return false when any opcode in that position does not
decode to a push number matching the expected count.
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
The short version

What changed, and why it matters

This commit fixes a bug in how the library decides whether a Bitcoin script is a classic 'multisig' script. Before the fix, the final opcode that states how many public keys are required could be something other than a normal number-pushing opcode (for example, a reserved or meaningless opcode), and the code would still treat the script as a valid multisig. After the fix, only opcodes that push a number matching the actual count of public keys are accepted. This could matter to any code that relies on is_multisig() to classify or validate scripts, because a misclassified script could lead to wrong policy decisions, fee calculations, or wallet behavior.

Recommended action

Review any downstream code that calls is_multisig() and confirm it now rejects the malformed scripts it previously accepted. Consider whether other script-pattern helpers (e.g., is_p2pkh, is_p2sh, is_p2wpkh) have similar 'break on any opcode' behavior and audit them for the same class of bug. No emergency action is indicated, but updating to the patched version is prudent for libraries that parse untrusted scripts.

Security signals we found

01

Script pattern validation bypass

02

Multisig classification bug

03

Non-canonical opcode accepted as valid push number

04

Regression test added for malformed multisig script

Risk score

Why this scored 62/100

Our methodology →
Potential impact 18/30
Exploitability 12/25
Stealth signal 10/15
Affected reach 10/15
Confidence 8/10
Evidence quality 4/5
Human-validated context

Community notes

Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.

No validated notes yet.

The AI analysis stands alone for now. Submit a note if you can add evidence or important context.