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

tx: reject non-corresponding output as per bip341

Public commit record

What the developer wrote

Authored by Jon Griffiths

68/100 · Adequate
tx: reject non-corresponding output as per bip341

Reported-by: Jordan Mecom (@jmecom) via https://github.com/jmecom/odo
✓ Descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body✓ Links an issue, advisory, or supporting reference
The short version

What changed, and why it matters

This commit fixes a bug in how Bitcoin taproot-style transaction signatures (BIP341) are computed. Under a special signature mode called SIGHASH_SINGLE, the code previously did not check whether the requested transaction output actually exists. BIP341 says such signatures must be rejected. Without this check, a wallet or signer could produce an invalid or ambiguous signature that other software might accept differently, potentially leading to unexpected transaction behavior or security issues in multi-party signing.

Recommended action

Review all call sites of bip341_signature_hash() to ensure callers handle WALLY_EINVAL correctly. Verify that test coverage includes the SIGHASH_SINGLE index-out-of-range case for both mainnet and Elements/Liquid builds. Consider whether any other sighash modes in BIP341 need similar validation.

Security signals we found

01

BIP341 specification non-compliance

02

Missing bounds check on SIGHASH_SINGLE output index

03

Potential signature hash ambiguity

04

Reported by external researcher

Risk score

Why this scored 73/100

Our methodology →
Potential impact 22/30
Exploitability 18/25
Stealth signal 10/15
Affected reach 12/15
Confidence 7/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.