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

lnmsg: validate point primitive field

Public commit record

What the developer wrote

Authored by f321x

78/100 · Adequate
lnmsg: validate point primitive field

Validate points to be valid ECPubkeys in lnmsg._read_primitive_field.
There are failing bolt12 test vectors that contain offers with invalid
points.
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
The short version

What changed, and why it matters

This commit adds a safety check in Electrum's Lightning message parser to reject invalid cryptographic 'points' (public-key-like values) instead of silently accepting them. Previously, malformed points could pass through parsing and potentially cause problems later. The change is defensive and aligns with official BOLT12 test vectors that expect invalid points to be rejected.

Recommended action

Treat as a hardening fix; include in normal release testing. Review whether other primitive field types (e.g., signatures, hashes) receive equivalent validation and whether downstream consumers of parsed point fields assume validation has occurred.

Security signals we found

01

Input validation added for cryptographic point fields

02

Previously skipped negative test now enforced

03

Malformed point now raises structured MalformedMsg exception

04

Aligns with failing BOLT12 test vectors containing invalid points

Risk score

Why this scored 47/100

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