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

onion_message: num_hops in blinded path is byte, not int.

Public commit record

What the developer wrote

Authored by Sander van Grieken

50/100 · Thin
onion_message: num_hops in blinded path is byte, not int.
✓ Specific, descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
The short version

What changed, and why it matters

This commit fixes a data-format bug in Electrum's Lightning onion-message handling. The number of hops in a 'blinded path' was being stored as a plain integer, but the protocol expects a single byte. The patch changes it to a bytes object. A second change only improves an error message when no reply path can be created. The fix is small and appears to prevent interoperability or parsing problems rather than a direct theft-of-funds vulnerability.

Recommended action

Treat as a normal bugfix patch. Review whether num_hops can ever exceed 255 and add an explicit bounds check if not already present. No urgent security response is indicated by the commit itself.

Security signals we found

01

Protocol serialization mismatch in a Lightning network message field

02

Field changed from Python int to single byte to match expected wire encoding

03

No explicit security claim, CVE, or advisory referenced in commit

04

No bounds check added; relies on existing len(onionmsg_hops) being <= 255

Risk score

Why this scored 22/100

Our methodology →
Potential impact 4/30
Exploitability 2/25
Stealth signal 3/15
Affected reach 4/15
Confidence 6/10
Evidence quality 3/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.