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

Log blinded route tails without payload bytes

Public commit record

What the developer wrote

Authored by auto-pr-bot

76/100 · Adequate
Log blinded route tails without payload bytes

`DebugRoute` formatted `Path::blinded_tail` with the derived `Debug`,
which emits every `BlindedHop::encrypted_payload` byte as a decimal
list. Routes are logged at INFO by the default router after the
recipient-provided blinded path from a BOLT 12 invoice has been cloned
into them, so a single "Got route" record scaled with—and could largely
consist of—invoice ciphertext chosen by whoever issued the invoice.

Instead, log one line for the tail's blinding point, excess CLTV expiry
delta and final value, one line per Trampoline hop, and one line per
blinded hop carrying its blinded node id and encrypted payload length.
Rendering each hop is then bounded to a fixed ~150 bytes regardless of
the payload size, while staying readable for debugging.

@val reported in #5084:

> `DebugRoute` formats `p.blinded_tail` with derived `Debug`. That
> recursively emits every `BlindedHop::encrypted_payload` byte as a
> decimal list. The default route finder logs this formatter at INFO
> (`Got route`) after cloning the selected recipient-provided blinded
> path into the route, so attempting payment of an attacker-issued BOLT
> 12 invoice can make an ordinary log record scale with—and
> substantially amplify—the invoice ciphertext. [...]

@matt asked:

> @auto-pr-bot please come up with a better way to log these, something
> that's relatively readable, the suggested fix isn't bad.

Requested-by: @matt
Link: https://git.rust-bitcoin.org/lightningdevkit/rust-lightning/issues/5084#issuecomment-449421

Fixes #5084

Authored-By: ggml-org/GLM-5.3-Flash-GGUF:Q4_K <goose@users.noreply.local>
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference
The short version

What changed, and why it matters

This change fixes a logging issue where paying a BOLT 12 invoice could cause the software to write an unusually large log entry. The previous code printed every byte of encrypted data from the invoice's hidden payment path as a long list of numbers, which could waste disk space, slow down logging, and potentially disrupt log collection systems. The fix prints only a short summary and the length of each encrypted payload instead.

Recommended action

Apply the patch. Review other Debug-derived logging of attacker-influenced byte vectors in the codebase to ensure bounded output. Consider adding a lint or test that prevents logging raw encrypted payloads at INFO or higher levels.

Security signals we found

01

CWE-779: Logging of Excessive Data

02

Potential log amplification / log flooding via attacker-controlled input

03

INFO-level logging of unbounded recipient-provided ciphertext

04

BOLT 12 invoice blinded path cloned into route before logging

Risk score

Why this scored 58/100

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