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

Fix script::Builder::push_verify() following a push_int()

Public commit record

What the developer wrote

Authored by Nadav Ivgi

75/100 · Adequate
Fix script::Builder::push_verify() following a push_int()

And add a test case that was previously failing.
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body✓ Mentions testing or verification
The short version

What changed, and why it matters

This commit fixes a bug in the Rust Bitcoin library's script builder. When building a Bitcoin script, after pushing a number onto the stack, the builder would incorrectly remember the last opcode it had seen. This caused a later call to `push_verify()` to try to combine with that remembered opcode, producing an invalid or unexpected script. The fix clears that remembered state whenever an integer is pushed, and adds a test to prevent regression.

Recommended action

Review any code using `Builder::push_int` followed by `push_verify` to confirm the generated scripts now match intent. Update to a release containing this fix. Consider auditing downstream consumers that build scripts dynamically.

Security signals we found

01

Script construction correctness bug

02

Builder state not invalidated after push_int

03

push_verify optimization could mispair with stale opcode

04

Potential for producing non-standard or invalid Bitcoin scripts

05

No explicit security disclosure in commit or references

Risk score

Why this scored 47/100

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