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

lightningd: allow --recover / recover JSON RPC to take mnemonic.

Public commit record

What the developer wrote

Authored by Rusty Russell

73/100 · Adequate
lightningd: allow --recover / recover JSON RPC to take mnemonic.

In fact, you *must* use mnemonic to successfully recover a modern node!

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Changed: JSON-RPC: `recover` takes a 12-word mnemonic for nodes created by v25.12 or later.
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
The short version

What changed, and why it matters

This commit updates Core Lightning's recovery feature so it can accept a 12-word mnemonic phrase, which is now the required way to recover nodes created with version 25.12 or later. Older nodes can still be recovered using the previous codex32 or hex formats. The change is a feature enhancement to support a new wallet backup format, not a fix for an active security vulnerability. However, because recovery material directly controls the node's secret keys, any bugs in how mnemonics are parsed, validated, or written to disk could have serious security consequences. The patch appears careful: it rejects encrypted/password-protected mnemonics during recovery and validates input, but it is a partial view of a larger change so we cannot fully assess the surrounding key-derivation code.

Recommended action

Review the full implementation of `validate_mnemonic()` and `derive_seed_hash()` in related commits to ensure mnemonic parsing and seed derivation are robust. Verify that the `hsm_secret` file format (seed hash + mnemonic) is handled securely by the HSM subsystem and that the mnemonic string is zeroed from memory after use. Continue normal testing; no immediate emergency response is indicated by this commit alone.

Security signals we found

01

Recovery path now handles mnemonic secrets and writes seed hash + mnemonic to hsm_secret file

02

Encrypted and password-protected mnemonic recovery is explicitly rejected

03

Input validation added for mnemonic, hex, and codex32 formats

04

Documentation and JSON schema updated to describe new required mnemonic behavior

05

No explicit security bug or CVE referenced in commit message or diff

Risk score

Why this scored 28/100

Our methodology →
Potential impact 5/30
Exploitability 5/25
Stealth signal 3/15
Affected reach 5/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.