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

common/bolt11: Fix BOLT11 hash calculation for unknown fallback address versions

Public commit record

What the developer wrote

Authored by Erick Cestari

65/100 · Adequate
common/bolt11: Fix BOLT11 hash calculation for unknown fallback address versions

Changelog-Fixed: Fixed hash calculation inconsistency when processing
invoices with unknown fallback address versions.
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
The short version

What changed, and why it matters

This change fixes how Core Lightning calculates the cryptographic hash of a BOLT11 invoice when the invoice contains a 'fallback address' whose version number is not recognized. Previously, the code would first read the version into the hash, then decide it was unknown and skip the field. That caused the hash to include data that the BOLT11 specification says should be left out, creating a mismatch with other implementations and potentially making the invoice unpayable or causing validation failures. The fix reads the version first without hashing it, skips unknown versions entirely, and only hashes the field for known versions.

Recommended action

Treat as a correctness fix with possible security implications for invoice integrity and interoperability. Review whether any other unknown-field handling paths similarly pre-hash data before skipping. Backport to maintained release branches if BOLT11 invoice parsing is exposed to untrusted input.

Security signals we found

01

BOLT11 invoice hash mismatch due to over-hashing of unknown fallback address version field

02

Spec non-compliance: unknown 'f' fields were partially included in the signed hash

03

Potential invoice validation/payment failure across implementations

04

No explicit security framing in commit message; described as 'hash calculation inconsistency'

Risk score

Why this scored 62/100

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