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

descriptor: reject nested expressions with unconsumed trailing input

Public commit record

What the developer wrote

Authored by odudex

73/100 · Adequate
descriptor: reject nested expressions with unconsumed trailing input

A nested expression was delimited only by its enclosing brackets and
commas, so trailing characters after it were silently ignored, e.g.
wsh(pk(KEY)xyz) parsed as wsh(pk(KEY)).
✓ Specific, 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 parsing bug in libwally-core's Bitcoin descriptor handling. Previously, if extra characters appeared after a valid nested expression inside parentheses, the parser silently ignored them. For example, 'wsh(pk(KEY)xyz)' was accepted as if it were just 'wsh(pk(KEY))'. This could let malformed or attacker-crafted descriptors be misinterpreted, potentially causing two users or programs to disagree about what a wallet script actually is. The fix makes the parser reject such trailing garbage.

Recommended action

Upgrade to a libwally-core release containing this commit. Review any previously accepted descriptor strings for trailing content, especially those generated from untrusted input or imported from third parties. If descriptors are used to derive addresses or scripts, re-validate them with the patched parser and compare the resulting scripts.

Security signals we found

01

Input validation bypass: parser accepted malformed descriptors with trailing garbage

02

Silent truncation/misinterpretation of user-supplied descriptor strings

03

Potential for consensus or policy mismatch between systems parsing the same descriptor

04

No explicit CVE or vendor security advisory supplied in commit or references

Risk score

Why this scored 53/100

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