EP
← All projectsElements Project

Core Lightning

Modular C implementation of the Lightning Network protocol and node stack.

BitcoinLightning NetworkActive incident
Repository coverage

2334 commits in the local evidence base

Every captured commit receives deterministic security triage and a separate communication-quality score. Security candidates and broader second-pass signals receive full-patch Ollama analysis.

228security candidates319second-pass queue1977AI analyses
103commits · 30 days
223commits · 60 days
710commits · 180 days
1582commits · 365 days
Backfill bands
Aug 5 → Feb 61049 seen37 candidatesComplete
Feb 6 → Jun 6579 seen10 candidatesComplete
Jun 6 → Jul 678 seen1 candidatesComplete
Jul 6 → Aug 5147 seen16 candidatesComplete
Commit communication

Does the history explain itself?

Message quality measures whether a commit identifies its scope, purpose, rationale, testing, and supporting references. It does not change the security-severity score.

71/100 average clarity
631Strong · 80–100
1400Adequate · 60–79
272Thin · 40–59
31Opaque · 0–39
Read the scoring rubric →
Developer activity

Who is changing the project?

Public Git author strings; identities are not independently verified.

DeveloperCommitsCandidatesAnalyzedHigh riskMessage avg.
cdecker331217581
daywalker9019315113471
Níckolas Goline961252376
Amperstrand322278
Rusty Russell96977961173
Sangbida Chaudhuri18537157167
Vincenzo Palazzo19714185
Lagrang3115679170
dovgopoly18016165
Dusty Daemon821378066
ShahanaFarooqui931093063
Peter Neuroth1509110074
Analysis record

Published AI watches

Last scanned 1 minute ago

Informational 15 AI analysisMessage 85 · Strong
EP Elements ProjectCore Lightning BitcoinLightning Network

doc: bring lightning-downgrade's version list up to v26.12.

This commit only updates documentation. It adds new version entries to the manual page for the lightning-downgrade tool and mentions the tool in the upgrade guide. No code, database logic, or security behavior is changed.

2e7a9f5aby Ken Sedgwick+9−12 files
No security note in commit
Informational 23 AI analysisMessage 66 · Adequate
EP Elements ProjectCore Lightning BitcoinLightning Network

Makefile: install lightning-downgrade.

This is a packaging/build fix, not a security vulnerability. The `lightning-downgrade` utility was being compiled but accidentally left out of the list of programs installed by `make install`. As a result, official release archives contain…

06ea9ba0by Ken Sedgwick+1−01 file
No security note in commit
Low 27 AI analysisMessage 83 · Strong
EP Elements ProjectCore Lightning BitcoinLightning Network

wallet: create bwatch tables before backfilling them

This commit fixes a database upgrade bug in Core Lightning. Wallets created with version v26.06.10 were missing two new tables (our_outputs and our_txs) because they skipped the migrations that create them. When users later upgraded, a fol…

Database migration failure could prevent node startup after upgradeFixes missing table creation before data backfillAdds regression test for upgrade path from v26.06.10
ce2a6836by daywalker90+105−02 files
No security note in commit
Informational 15 AI analysisMessage 5 · Opaque
EP Elements ProjectCore Lightning BitcoinLightning Network

v26.12rc1

This commit is a routine version bump from v26.06.10 to v26.12rc1 for Core Lightning. It only updates version strings in packaging files, a changelog, and a lockfile. There are no code changes that introduce, fix, or modify any security-se…

4002c4e9by Níckolas Goline+164−1110 files
No security note in commit
Low 30 AI analysisMessage 68 · Adequate
EP Elements ProjectCore Lightning BitcoinLightning Network

wallet: store payment failure details per groupid

This commit fixes a database bug in Core Lightning where failure details for a payment attempt were being overwritten by later retry attempts that shared the same payment identifier fragment. The fix makes the failure record match on an ad…

Data integrity bug causing incorrect error reporting across payment retry groupsNo memory safety, authentication, authorization, or cryptographic issues presentNo external input is trusted or validated differently
24082c6dby daywalker90+6−34 files
No security note in commit
Low 43 AI analysisMessage 83 · Strong
EP Elements ProjectCore Lightning BitcoinLightning Network

cln-plugin: do not panic when the log writer task is gone

This commit fixes a bug in Core Lightning's Rust plugin library where a plugin could crash with a panic if it tried to log a message after the internal log-writing task had already stopped, such as during shutdown. The fix makes the plugin…

panic on send failure replaced with stderr fallbacklog message no longer silently dropped on writer task exitunit test added for dropped-receiver scenario
8661ffabby cdecker+29−11 file
No security note in commit
Informational 15 AI analysisMessage 90 · Strong
EP Elements ProjectCore Lightning BitcoinLightning Network

docs: explain hsmtool HTLC recovery

This commit only adds documentation to the manual page for an existing command-line tool (hsmtool). It explains how to recover funds from old Lightning payment commitments (HTLCs) after losing channel state. There are no code changes, no n…

f90c140dby Sangbida Chaudhuri+85−01 file
No security note in commit
Informational 15 AI analysisMessage 68 · Adequate
EP Elements ProjectCore Lightning BitcoinLightning Network

tests: make test_delpay_works deterministic

This commit only changes a test file to make a flaky test more reliable. It does not modify any production code, so it has no security impact on real users.

a224ca81by daywalker90+16−161 file
No security note in commit
Informational 20 AI analysisMessage 73 · Adequate
EP Elements ProjectCore Lightning BitcoinLightning Network

doc: say that listtransactions gives blockheight 0 for a tx not in a block

This commit only updates documentation to explain that the `listtransactions` command reports a block height and transaction index of 0 when a transaction is not currently in a block (for example, because it hasn't been mined yet or was re…

bc281be3by Peter Neuroth+4−42 files
No security note in commit
Informational 20 AI analysisMessage 50 · Thin
EP Elements ProjectCore Lightning BitcoinLightning Network

fixup! pyln-client: don't crash Millisatoshi.to_approx_str() on zero

This is a small bug fix in a Python helper library used by Core Lightning. The Millisatoshi.to_approx_str() method previously crashed with a math error when converting a zero amount to a human-readable string. The patch makes zero return "…

No security-relevant signals presentFix is a routine correctness/robustness improvement
02612ed5by Amartya Singh+4−31 file
No security note in commit
Moderate 62 AI analysisMessage 73 · Adequate
EP Elements ProjectCore Lightning BitcoinLightning Network

wallet: reject unmodifiable PSBTs in addpsbtoutput/addpsbtinput

This update fixes a crash in two wallet commands, addpsbtoutput and addpsbtinput. These commands let users add extra transaction outputs or inputs to a PSBT (a Bitcoin transaction planning file). If a user supplied a PSBT whose version 2 '…

Daemon crash (assertion failure) on crafted/strict PSBT inputMissing validation of PSBT v2 modifiable flags before mutationUser-controlled input directly passed to libwally without precondition check
42472816by daywalker90+14−12 files
Vendor flagged security relevance
Moderate 59 AI analysisMessage 83 · Strong
EP Elements ProjectCore Lightning BitcoinLightning Network

tests: show addpsbtoutput/addpsbtinput crash on an unmodifiable v2 PSBT

This commit only adds a new test case that demonstrates two Core Lightning commands, addpsbtoutput and addpsbtinput, crash with an internal assertion when given a v2 PSBT that does not allow adding inputs or outputs. The test is marked as …

Daemon abort due to failed assertion in PSBT helper functionsRPC commands addpsbtoutput and addpsbtinput lack validation of PSBT modifiability flags before calling libwallyPotential denial-of-service vector: any caller able to submit a crafted v2 PSBT can crash lightningd
42e268abby daywalker90+60−01 file
No security note in commit
Informational 20 AI analysisMessage 73 · Adequate
EP Elements ProjectCore Lightning BitcoinLightning Network

pyln-client: don't crash Millisatoshi.to_approx_str() on zero

This commit fixes a minor bug in Core Lightning's Python client library where calling a pretty-printing method on a zero-amount payment would crash with a ValueError. It is a routine correctness fix, not a security vulnerability. There is …

5ebe365dby Amartya Singh+3−12 files
No security note in commit
Moderate 59 AI analysisMessage 83 · Strong
EP Elements ProjectCore Lightning BitcoinLightning Network

dualopen and splicing: add minimal verification of tx_signatures

This commit adds missing safety checks in Core Lightning when a peer sends signatures for opening or splicing a dual-funded Lightning channel. Before the patch, the software accepted peer-provided transaction witnesses without verifying th…

Missing input validation on peer-provided witness dataBOLT-2 compliance fix for tx_signaturesRejection of empty witness stacks
c6be4f71by Lagrang3+633−97 files
Vendor flagged security relevance
Moderate 54 AI analysisMessage 85 · Strong
EP Elements ProjectCore Lightning BitcoinLightning Network

channeld: abort_channels no longer fails a channel with a signed splice

This fix prevents a user-issued 'abort channels' command from incorrectly failing a Lightning channel when a splice transaction has already been signed. Previously, the code would pass the latest in-flight splice to a routine that aborts i…

Denial-of-service/availability impact: user-initiated abort could inadvertently fail a funded channelProtocol compliance fix: avoids sending tx_abort after tx_signatures, which BOLT 2 forbidsState-handling bug in splice negotiation lifecycle
c87f5573by Andezion+22−11 file
No security note in commit
Moderate 51 AI analysisMessage 73 · Adequate
EP Elements ProjectCore Lightning BitcoinLightning Network

lightningd: fix crash on mutual close of an unconfirmed dual-funded channel

This update fixes a bug where a specific type of Lightning channel close could crash the node. It only happens when both parties cooperatively close a dual-funded channel that has not yet been confirmed and has gone through a funding bump …

NULL pointer dereference leading to daemon crash (denial of service)Crash occurs in cooperative-close path for unconfirmed dual-funded/RBF channelsFix uses canonical channel funding key instead of splice-only field
555143beby Sangbida Chaudhuri+9−31 file
Vendor flagged security relevance
High 74 AI analysisMessage 73 · Adequate
EP Elements ProjectCore Lightning BitcoinLightning Network

cln-grpc: reject malformed request values instead of panicking

This commit fixes a security bug in Core Lightning's gRPC plugin (cln-grpc). Previously, a malformed request from a gRPC client could crash the plugin: bad public keys, hashes, secrets, channel IDs, or enum values triggered Rust 'unwrap()'…

Denial-of-service via malformed gRPC request causing tonic worker task panicDenial-of-service via std::process::exit(1) in ProofField conversion on missing oneofSilent integer truncation of u16/u8 fields via 'as' casts
b2703436by daywalker90+1558−12135 files
Vendor flagged security relevance
Informational 15 AI analysisMessage 51 · Thin
EP Elements ProjectCore Lightning BitcoinLightning Network

nix: drop protobuf again

This commit removes the protobuf package from the Nix build environment because it is no longer needed. A previous change made the cln-grpc component use its own bundled protoc compiler instead of relying on the system one. The Python bind…

a0459eeeby Peter Neuroth+0−11 file
No security note in commit
Informational 15 AI analysisMessage 73 · Adequate
EP Elements ProjectCore Lightning BitcoinLightning Network

make: check gRPC protos for breaking changes against the last release

This commit adds a new automated check to the project's build process that compares gRPC protocol definitions against the last release to catch accidental breaking changes early. It does not change any runtime code, fix a bug, or introduce…

db5fea70by daywalker90+43−84 files
No security note in commit
Repository ledger

Explore captured commits

Expand any commit for its author, full message, clarity score, changed files, triage signals, analysis, and source link.

Lower-prioritytests: cover fee rescue input selection with an immature coinbaseby Níckolas Goline · 5ae05f21 · Aug 18, 2026 · 1 fileMessage 83 · StrongTriage 0Details
Commit message · Níckolas Goline

tests: cover fee rescue input selection with an immature coinbase

wallet_utxo_boost() picks the wallet inputs which fund anchor and HTLC fee
rescue transactions. Ordinary coin selection filters immature coinbase
outputs via deep_enough(); a rescue funded by one cannot confirm, so rescue
selection needs the same filter.

Give the closing node a single immature block reward as its only wallet
output, and check that it declines to boost rather than selecting it.

Marked xfail(strict=True) since the selector is not yet fixed; the next
commit removes the marker.

(cherry picked from commit daa5654d480381147f9084c6557b972d023a77e4)

83/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
Lower-prioritytests: reproduce zero next_commitment_number on advanced channelby Vincenzo Palazzo · cea73b83 · Aug 18, 2026 · 1 fileMessage 91 · StrongTriage 0Details
Commit message · Vincenzo Palazzo

tests: reproduce zero next_commitment_number on advanced channel

BOLT #2 says if next_commitment_number is zero we MUST immediately
fail the channel and broadcast the latest commitment. On an
advanced channel a reset peer sends 0 for both numbers; we warn
about the stale revocation_number and never reach the zero check,
so the channel stays up.

The test funds, pays so next_index is past 1, then injects that
reestablish. It fails until the next commit.

Reproduces: #9425
Reported-by: Leo Nash (@tankyleo)
Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>

91/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification✓ Links an issue, advisory, or supporting reference
Lower-prioritychanneld: fail channel on zero next_commitment_numberby Vincenzo Palazzo · eafdd938 · Aug 18, 2026 · 1 fileMessage 81 · StrongTriage 0Details
Commit message · Vincenzo Palazzo

channeld: fail channel on zero next_commitment_number

The existing BOLT #2 quote already required this, but the first
bullet was unimplemented: the only zero check sat under
next_commitment_number == next_index[REMOTE] - 1, after the
stale-revocation warning.

Implement that bullet next to the quote, and drop the nested copy.

Fixes: #9425
Changelog-Fixed: Protocol: immediately fail the channel if channel_reestablish next_commitment_number is zero.
Reported-by: Leo Nash (@tankyleo)
Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>

81/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference
Lower-priorityhsmd: test that a NULL reply closes the client exactly onceby Sangbida Chaudhuri · bfd66b3a · Aug 18, 2026 · 4 filesMessage 83 · StrongTriage 0Details
Commit message · Sangbida Chaudhuri

hsmd: test that a NULL reply closes the client exactly once

libhsmd returning NULL has no black-box behaviour change, so drive
hsmd.c's io loop directly: io_set_finish counts the close, and a
write after close aborts.

Changelog-None

(cherry picked from commit 523be992eb1b16df30c3e366129854539cce36ab)

83/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
Lower-priorityonchaind: only record an HTLC as theirs once that's finalby cdecker · 887eaf9f · Aug 18, 2026 · 1 fileMessage 73 · AdequateTriage 0Details
Commit message · cdecker

onchaind: only record an HTLC as theirs once that's final

When an incoming HTLC timed out we told the bookkeeper immediately that it
had gone back to the peer. If a late preimage then let us claim it after
all, we booked it *again*, this time to ourselves: the bookkeeper never
reverses an event, so the commitment output ends up with two deposits.
find_txo_set() then builds two pairs for one output, the pairs ==
closed_count check in account_onchain_closeheight() fails, and the channel
is never marked resolved.

We can't record it any earlier than we know it, so record it later instead:
when we see their spend confirm, or, for an output nobody ever spent, on
our way out of wait_for_resolved(), where no preimage can reach us any
more. Note we can't record it in the spend arm alone: propose_ignore()
uses cltv_expiry while their spend can only confirm after it, so we always
give up on the output before they take it, and the deposit would go
unrecorded (which leaves the channel unresolved just the same).

As a side-effect this also covers propose_ignore()'s immediate path, taken
when the commitment confirms at or after the expiry, which never recorded
anything at all.

Changelog-Fixed: bookkeeper: An incoming HTLC we claim with a late preimage after it timed out is no longer booked both to the peer and to us

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Lower-priorityonchaind: resolve THEIR_HTLC when the peer takes it backby cdecker · ffc94c73 · Aug 18, 2026 · 1 fileMessage 73 · AdequateTriage 0Details
Commit message · cdecker

onchaind: resolve THEIR_HTLC when the peer takes it back

The non-revoked THEIR_HTLC arm of output_spent() only annotates: it has
always relied on the "no witness elements" fallback in tx_new_depth() to
resolve the output once we reach the timeout depth. But handle_preimage()
replaces that ignore-proposal with a real spend, which fills in the witness
elements, and kills the fallback for that output.

So on the losing side of the same race the previous commit fixes -- their
HTLC-timeout confirms after we decided to claim it -- nothing ever resolves
the output: wait_for_resolved() spins forever, we never send
all_irrevocably_resolved, and the channel is never forgotten. There's a
second ordering with the same outcome: we see their spend first (and skip
it, as the output is resolved), then the preimage arrives and clears that
resolution.

Resolve it in the spend arm, and don't try to claim an output we watched
them spend: there is nothing left to grab, and proposing a spend of it is
exactly what strands us. That's the *only* case where we decline a
preimage: an HTLC we merely gave up on is always still claimable, which is
what the enum makes explicit.

Changelog-Fixed: onchaind: Don't wait forever if the peer takes back an HTLC we were trying to claim with a late preimage

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
AI review queuedaskrene: fix crash loading node bias with descriptionby Vincenzo Palazzo · 4681177d · Aug 18, 2026 · 2 filesMessage 91 · StrongModerate 59Details
Commit message · Vincenzo Palazzo

askrene: fix crash loading node bias with description

load_node_bias() passed take(description) to two consecutive
set_node_bias() calls. The first call's tal_strdup() consumes the
take (tal_resize_ + tal_steal), so the second take() was on freed
memory and we aborted in to_tal_hdr() with "Not a valid header"
while loading the layer at startup. Since askrene is an important
plugin, lightningd shuts down and the node cannot restart at all.

The description is already a copy off tmpctx, so simply don't take()
it: set_node_bias() strdups it into the bias anyway.

With this, the test from the previous commit passes.

Fixes: #9433
Reported-by: endothermicdev
Changelog-Fixed: askrene: node failed to start (`exited before replying to init`) when a persistent layer contains a node bias with a description
Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>

91/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification✓ Links an issue, advisory, or supporting reference
Why it was queued
second-pass: broader security terminology
AI analysis · Moderate 59/100

This commit fixes a bug in Core Lightning's askrene plugin that could prevent a node from restarting. When a saved routing layer contained a node bias with a description, the plugin accidentally freed the description's memory while using it a second time, causing an immediate crash during startup. The fix removes the incorrect 'take ownership' call so the description remains valid for both uses. There is no evidence this crash can be triggered remotely or used as an attack; it appears to be a reliability bug that only affects nodes that already have such saved data.

AI review queuedtests: restart the node which owns the layer in node bias testby Vincenzo Palazzo · 0f3f67a0 · Aug 18, 2026 · 1 fileMessage 91 · StrongInformational 12Details
Commit message · Vincenzo Palazzo

tests: restart the node which owns the layer in node bias test

test_node_bias_persistence() restarted l2, but the layer and its
node bias records live in l1's datastore. The assert compared
l1's in-memory layer against itself, so load_node_bias() was never
actually exercised and this test could not have caught the startup
crash in #9433.

Restarting l1 instead makes the test reload the layer from the
datastore at startup. This is the reproducer for #9433; it fails
until the next commit.

Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>

91/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification✓ Links an issue, advisory, or supporting reference
Why it was queued
second-pass: broader security terminology
AI analysis · Informational 12/100

This commit only fixes a test case so it actually exercises the intended code path. It does not change any production code, so it cannot introduce or fix a real-world security vulnerability by itself. The test change is a reproducer for a startup crash reported elsewhere, but the crash fix is in a separate commit.

Security candidatedualopend: bound the feerates a peer opens atby cdecker · ba08356f · Aug 17, 2026 · 4 filesMessage 68 · AdequateHigh 78Details
Commit message · cdecker

dualopend: bound the feerates a peer opens at

The previous commits bounded the feerates arriving on every path except
this one. `accepter_start()` takes both `funding_feerate_perkw` and
`feerate_per_kw_commitment` straight off the wire from `open_channel2`
with no bound in either direction, and `dualopend_wire.csv` had no
min_feerate/max_feerate on `dualopend_init` at all -- so it is not that
the check was forgotten at the call site, it is that the bounds were
never plumbed to the daemon.

The `openchannel2` hook only *reports* `feerate_our_max`/`feerate_our_min`
to plugins. With no plugin hooked nothing enforces them, so a peer could
name any feerate and we would sign for it and store it. This is the
`open_channel2` plant named in the advisory, and the missing lower bound
is where the stored `feerate == 0` comes from.

Plumb the bounds into dualopend_init and dualopend_reinit -- reinit too,
since rbf_remote_start runs after a reconnect -- and apply them where the
values are parsed. The two feerates get different floors:

- The commitment feerate is held to feerate_min, as openingd holds
open_channel's: too low and the commitment we are signing cannot be
relayed at the point we need it.
- The funding feerate is held only to FEERATE_FLOOR. A slow funding tx
is the opener's problem and RBF is the remedy, so our policy minimum
would refuse perfectly good opens; but 0 is not a feerate, and it is
exactly the value that leaves no valid next RBF step.

The RBF path needs the upper bound separately: check_funding_feerate()
only enforces the 25/24 step *upwards*, so without this a peer can walk
an accepted open's feerate up without limit, one RBF at a time.

rbf_local_start() is left alone deliberately: that feerate comes from our
own openchannel_bump, which lightningd already holds to our_feerate_max.

As with channeld and openingd, ignore_fee_limits relaxes the policy
bounds but never FEERATE_CEILING.

Changelog-Fixed: dualopend: a peer opening a channel with `--experimental-dual-fund` can no longer name an arbitrary funding or commitment feerate; both are now bounded as other remote-proposed feerates are.
(cherry picked from commit 4e653ad602adbb6afe7f727e029723c6f902171e)

68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
signing boundary
AI analysis · High 78/100

This commit fixes a bug in Core Lightning's experimental dual-funded channel feature. When another node tried to open a channel, Core Lightning was not checking whether the proposed transaction fees were reasonable. A peer could request a fee of zero, an impossibly high fee, or a commitment transaction fee so low it would never confirm. Core Lightning would sign and store these values anyway. The fix adds minimum and maximum fee checks, similar to those already present for other channel-opening paths.

Security candidatetests: regression coverage for out-of-range feeratesby cdecker · 65bdbc47 · Aug 17, 2026 · 2 filesMessage 100 · StrongHigh 72Details
Commit message · cdecker

tests: regression coverage for out-of-range feerates

Three tests, one per way an absurd feerate used to get in or blow up.

test_feerate_ceiling drives the fee source: bcli trims anything wider
than a u32 of perkb to exactly 0xFFFFFFFF, which is also the value whose
+3 wrapped in the perkb->perkw conversion, so a fee source producing an
absurdly *high* feerate used to arrive as 0perkw and get quietly raised
to the floor. It fails without both the widened conversion and the
ceiling.

test_splice_stored_feerate_repaired_on_upgrade plants the poisoned value
on an inflight and then rewinds the db version so the clamping migrations
run over it, which is the upgrade an already-attacked node goes through.
Parametrized over the overflow value in both the form lightningd itself
would have stored it (db_bind_int makes it negative) and the form you get
writing it by hand, plus the zero case and a merely-large one. Asserts
both that the row is repaired and that listpeerchannels -- which used to
abort right here -- agrees.

test_splice_feerate_too_high covers the accepter bound, which did not
previously exist: force_feerate gets us past our own check on what we
will pay, leaving the peer's bound as the thing under test. The RPC
blocks because the splice_ack never comes, hence the thread.

Changelog-None

(cherry picked from commit a609189feeaad80680c35791abad7e1fea66974d)

100/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode✓ Mentions testing or verification✓ Names security-relevant behavior explicitly
Why it was queued
explicit security languagememory safety
AI analysis · High 72/100

This commit adds regression tests for three related bugs where wildly wrong Bitcoin transaction feerates could enter Core Lightning. In the worst case, a malicious or broken fee source could make the node think a feerate was zero (due to a 32-bit integer overflow), causing transactions to be mined very slowly or not at all. Another bug let an attacker plant an out-of-range feerate in the database, which then crashed the node every time it started because a plugin called listpeerchannels before the RPC was available. A third bug allowed a peer to propose a splice with an absurdly high feerate that the accepting node did not previously reject. The commit only contains tests; the actual fixes are implied to exist in the code the tests exercise.

Security candidatelightningd: don't assert on funding feerates read from the dbby cdecker · d67c4936 · Aug 17, 2026 · 7 filesMessage 86 · StrongModerate 64Details
Commit message · cdecker

lightningd: don't assert on funding feerates read from the db

The 25/24 RBF escalation from BOLT #2 is computed on a u32 in three
places, and two of them assert that the result came out larger than the
input. It doesn't, for anything above UINT_MAX/25: the multiplication
wraps and the assert fires. That value comes out of
channel_funding_inflights, which is to say out of whatever fee estimator
(ours or a peer's) produced it, so it is not an invariant we were ever in
a position to state.

The worse of the two is in json_add_channel. listpeerchannels is
read-only introspection that plugins call at startup, so one bad row
turns into a crash-loop with no RPC left to repair it with.

check_funding_feerate() in dualopend already had the right shape for
this, so hoist it into bitcoin/feerate.c as next_funding_feerate() and
use it at all three sites rather than keeping three copies of the
calculation. It also rejects a last feerate of 0, which is the other end
of the same problem: assert(last_feerate > 0) sits immediately above the
overflow one.

That makes next_feerate a field we can fail to produce, so the schema no
longer requires it: a last feerate of 0, or one below 24 where rounding
down lands back on itself, admits no valid next feerate, and there is no
honest value to print for one. The bindings already modelled it that
way (Option<String> in cln-rpc, optional in the proto), so the required
list was the outlier.

The preceding commits bound every path a feerate arrives on, and the
migration repaired what was already stored, so the invariant does now
hold. This is the belt to their braces: a future unbounded write path
should not be able to turn straight back into a crash-loop, and finding
out about it in listpeerchannels is finding out too late. Since the
stored value is in range, the output is unchanged in every reachable
case. openchannel_bump fails the command rather than the daemon.

Changelog-Fixed: lightningd: `listpeerchannels` no longer aborts when a channel has an out-of-range funding feerate stored for an in-progress open.
Changelog-Changed: JSON-RPC: `listpeerchannels`.`next_feerate` is now optional: it is omitted for an in-progress open whose stored feerate admits no valid next feerate.
(cherry picked from commit 84443b55fc4a5cc2d6e3a557f2c58dca60f8f264)

86/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference✓ Names security-relevant behavior explicitly
Why it was queued
memory safety
AI analysis · Moderate 64/100

This update fixes a crash bug in Core Lightning. When the software tried to list details of a channel opening in progress, it could crash if a stored fee rate was extremely large or zero. The crash happened because the code used an internal sanity check (an 'assert') that treated bad stored data as an impossible condition. The fix replaces that hard crash with a safe failure: it either skips the optional 'next fee rate' field in the output, or returns an error for the specific command. This prevents a single bad database row from making the whole node crash repeatedly at startup.

Security candidatewallet: clamp absurd inflight funding feerates on upgradeby cdecker · f057c692 · Aug 17, 2026 · 1 fileMessage 86 · StrongModerate 53Details
Commit message · cdecker

wallet: clamp absurd inflight funding feerates on upgrade

The bounds in the previous commits only apply to feerates arriving from
now on. Nodes that already recorded an absurd `funding_feerate` for an
inflight splice or dual-fund RBF are stuck: the BOLT #2 rule that the
next RBF pays 25/24 times the last feerate is computed on a u32, so
anything above UINT_MAX/25 overflows and trips the
assert(next_feerate > last_feerate) in listpeerchannels. Plugins call
listpeerchannels at startup, so such a node crash-loops with no way out
but to rewrite the stored value.

Clamp it on upgrade. Note we write the feerate with db_bind_int(), so a
u32 above INT_MAX reads back negative; those are exactly the values that
overflow, hence the second clause.

Rewriting is safe: this feerate only sanity checks the fee the funding
transaction already pays and tells the user what the next RBF has to
beat. It never feeds anything we have signed, and lowering it only
relaxes the check.

Changelog-Fixed: lightningd: nodes that stored an out-of-range feerate for an in-progress splice no longer crash-loop on `listpeerchannels`; the stored feerate is clamped on upgrade.
(cherry picked from commit 0393174cb312079da1e0d272640cac145ccdf4c7)

86/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference✓ Names security-relevant behavior explicitly
Why it was queued
memory safetysigning or wallet path
AI analysis · Moderate 53/100

This commit fixes a bug where Core Lightning nodes could get stuck in a crash loop. If a node had previously stored an extremely high or zero fee rate for an in-progress channel funding operation (a 'splice' or dual-funded channel RBF), a later code check would overflow or fail an assertion when listing peer channels. Since plugins call that list at startup, the node would keep crashing. The fix adds a database upgrade step that clamps those bad stored values to safe limits when the node starts up after updating.

Lower-prioritylightningd: prefer latest blocks when querying historic blocks.by Rusty Russell · 3588f826 · Aug 17, 2026 · 1 fileMessage 73 · AdequateTriage 0Details
Commit message · Rusty Russell

lightningd: prefer latest blocks when querying historic blocks.

Worst case, we can get flooded with 10,000 scids, and we work through
them one at a time. In practice, there are more channels in more
recent blocks, so we should bias towards those. The iteration is not
free, but compared to all those getutxo calls with each block, it's
invisible.

```
$ ./devtools/dump-gossipstore gossip_store-2026-08-17 | grep -v ' t=0 ' | sed -n 's/.*channel_announcement(\([0-9]*\)x.*).*/\1/p' | stats --histogram
962804************************************************************************
|********************************************************
|**********************************
|***************
|**********
|**********
|********
|*******
|********
|***
|*
|*
|***
515419
```

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

(cherry picked from commit cf06f3d3a206df0d36ae240535af9c4582e73fc8)

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Lower-prioritygossipd: don't bother looking up ancient blocks.by Rusty Russell · 3589fd7c · Aug 17, 2026 · 1 fileMessage 68 · AdequateTriage 0Details
Commit message · Rusty Russell

gossipd: don't bother looking up ancient blocks.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(cherry picked from commit 511106d1cb0102e437c53650ce01823950c81a49)

68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
AI review queuedaskrene: exclude stubchannels from routingby niftynei · c313eff5 · Aug 15, 2026 · 2 filesMessage 80 · StrongModerate 60Details
Commit message · niftynei

askrene: exclude stubchannels from routing

My node has some recovered channels, which were causing a crash
in askrene, due to the fact that they have duplicate scids.

Easy fix is simply to skip recovered stubs when planning
routes.

Aug 15 16:34:14 citrine lightningd[1976574]: cln-askrene: ./plugins/askrene/child/additional_costs.h:26: additional_cost_htable_add: Assertion `!additional_c ost_htable_getmatch_(ht, k, h, v, &i)' failed.

Changelog-Fixed: Crash when trying to pay and you have recovered channel stubs in your peers list

80/100 · StrongMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode
Why it was queued
second-pass: broader security terminology
AI analysis · Moderate 60/100

This commit fixes a crash in Core Lightning's routing plugin (askrene) that occurred when a user had 'recovered channel stubs'—placeholder records left behind after restoring a node from a backup. These stubs all share the same placeholder channel ID (1x1x1), which caused an internal table that expects unique IDs to fail an assertion and crash the plugin. The fix makes askrene skip these stubs when planning routes. The crash is triggered by normal user actions (trying to pay with recovered stubs present), not by a remote attacker, and the plugin can be restarted.

Lower-prioritynix-builds: on macos, dont attempt to start 2nd lowdown sandboxby niftynei · ba3bd7da · Aug 15, 2026 · 1 fileMessage 73 · AdequateTriage 0Details
Commit message · niftynei

nix-builds: on macos, dont attempt to start 2nd lowdown sandbox

We're already in a sandbox when you're running `nix build`.
MacOS explicitly disallows nested sandboxes. If on Darwin and
running in a nix sandbox, we explicitly disable the `lowdown` sandbox

Changelog-Fixed: macos: builds with lowdown succeed, as we no longer attempt to spawn a nested sandbox

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Security candidaterust: don't silently eat overflow errors in --releaseby niftynei · bba8fc55 · Aug 15, 2026 · 1 fileMessage 88 · StrongModerate 61Details
Commit message · niftynei

rust: don't silently eat overflow errors in --release

When running `nix build .#default -L` I came across two failures:

> failures:
>
> ---- primitives::test::test_amount_add_overflow stdout ----
> note: test did not panic as expected at cln-rpc/src/primitives.rs:1064:8
> ---- primitives::test::test_amount_sub_overflow stdout ----
> note: test did not panic as expected at cln-rpc/src/primitives.rs:1057:8
>
> failures:
> primitives::test::test_amount_add_overflow
> primitives::test::test_amount_sub_overflow
>
> test result: FAILED(B. 36 passed; 2 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.01s

Rather than wrapping silently, we now error.

Changelog-Fixed: rust: Amounts that overflow fail, don't silently ignore in release builds

88/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification✓ Names security-relevant behavior explicitly
Why it was queued
memory safety
AI analysis · Moderate 61/100

This commit fixes a bug in Core Lightning's Rust code where adding or subtracting monetary amounts would silently wrap around to incorrect values in release builds, instead of failing as intended. The fix makes overflow and underflow explicitly cause an error (panic), so bad calculations can't be quietly ignored. This is a security-relevant correctness issue because silently wrong amounts could lead to incorrect balances or payments.

Security candidateconfigure: fallback to using local python when `uv` not presentby niftynei · 548d0a5a · Aug 15, 2026 · 2 filesMessage 85 · StrongInformational 19Details
Commit message · niftynei

configure: fallback to using local python when `uv` not present

Builds on NixOS are failing due to lack of python configuration

> PYTHONPATH=contrib/msggen contrib/msggen/msggen/__main__.py bundle doc/schemas
> /nix/store/rlq03x4cwf8zn73hxaxnx0zn5q9kifls-bash-5.3p3/bin/bash: line 1: contrib/msggen/msggen/__main__.py: Permission denied
> make: *** [contrib/msggen/Makefile:15: contrib/msggen/msggen/schema.json] Error 126

We can: fail if not configured and use the local python3 path
if/when `uv` doesn't work.

We also add an error when PYTHON isn't configured, and remove the
local override for the nix setup (since it should be fixed now).

Changelog-Fixed: nix-builds: correctly set PYTHON in case where `uv` is not present

85/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode
Why it was queued
credential or privilege state
AI analysis · Informational 19/100

This commit fixes a build problem on NixOS where the configure script couldn't find a working Python interpreter. It makes the build fall back to the local python3 when the 'uv' tool isn't available, and now errors out clearly if no Python is found. It is a build reliability fix, not a security vulnerability patch.

Lower-prioritydoc: fix and extend `htlc_accepted` documentation for `resolve`by daywalker90 · 3bc430de · Aug 14, 2026 · 3 filesMessage 73 · AdequateTriage 0Details
Commit message · daywalker90

doc: fix and extend `htlc_accepted` documentation for `resolve`

The documentation around the resolve response was outdated. CLN does
check the preimage and fails the HTLC incase of a mismatch.

Changelog-None

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Lower-priorityopenchannel: remove dead code.by Rusty Russell · 93f84627 · Aug 14, 2026 · 1 fileMessage 58 · ThinTriage 0Details
Commit message · Rusty Russell

openchannel: remove dead code.

This triggered a false positive use-after-free issue from Red Team.

In fact, the children of new_node_copy are deliberately owned by clone already
(see f2468963488026b7a9fa2c08a60f391195745ae8) so this cleanup attempt
(which was wrong, since size_t is never "> -1") was unnecessary anyway.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

58/100 · ThinMessage clarity
✓ Descriptive subject✓ Provides detailed explanatory context
Lower-prioritybcli: require bitcoind >= 23.0, and remove unneeded bitcoind version gate for getblockfrompeer.by Rusty Russell · 5110f7b1 · Aug 14, 2026 · 1 fileMessage 73 · AdequateTriage 0Details
Commit message · Rusty Russell

bcli: require bitcoind >= 23.0, and remove unneeded bitcoind version gate for getblockfrompeer.

Minimum version for bitcoind in CI is 25.0, but elements is older.

Bump hard reject version to 23.0 (which elements will still pass, just).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Lower-priorityclosingd: Add a sanity check for feerateby Dusty Daemon · d24960af · Aug 13, 2026 · 1 fileMessage 68 · AdequateTriage 0Details
Commit message · Dusty Daemon

closingd: Add a sanity check for feerate

As a final check before sending any signed mutal close, we confirm the fee remains below our max fee to accept.

Changelog-None

(cherry picked from commit 0aae0d53da34779613f40ba74e70eca896c3a524)

68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
AI review queuedlightningd: fix crash on invoice_payment_hook_doneby Lagrang3 · f435096d · Aug 13, 2026 · 2 filesMessage 78 · AdequateModerate 66Details
Commit message · Lagrang3

lightningd: fix crash on invoice_payment_hook_done

```
Valgrind error file: valgrind-errors.3449770
==3449770== Invalid read of size 8
==3449770== at 0x1B4F4A: htlc_set_fail_ (htlc_set.c:77)
==3449770== by 0x1B59FB: invoice_payment_hooks_done (invoice.c:276)
==3449770== by 0x1EC5DF: hook_done (plugin_hook.c:243)
==3449770== by 0x1EC710: plugin_hook_call_next (plugin_hook.c:343)
==3449770== by 0x1EC90E: plugin_hook_callback (plugin_hook.c:299)
==3449770== by 0x1E6316: plugin_response_handle (plugin.c:692)
==3449770== by 0x1EB443: plugin_read_json (plugin.c:781)
==3449770== by 0x283D01: next_plan (io.c:60)
==3449770== by 0x28418C: do_plan (io.c:422)
==3449770== by 0x284245: io_ready (io.c:439)
==3449770== by 0x285BE3: io_loop (poll.c:471)
==3449770== by 0x1B9A99: io_loop_with_timers (io_loop_with_timers.c:22)
==3449770== Address 0x38 is not stack'd, malloc'd or (recently) free'd
==3449770==
{
<insert_a_suppression_name_here>
Memcheck:Addr8
fun:htlc_set_fail_
fun:invoice_payment_hooks_done
fun:hook_done
fun:plugin_hook_call_next
fun:plugin_hook_callback
fun:plugin_response_handle
fun:plugin_read_json
fun:next_plan
fun:do_plan
fun:io_ready
fun:io_loop
fun:io_loop_with_timers
}

```

Changelog-Fixed: lightningd: fix crash of lightningd on race condition between delinvoice and a returning invoice_payment hook for fallback onchain settlements

Reported-by: Vincenzo Palazzo (Bitcoin Security Council finding 2026-08-11)
Co-Authored-By: Grok 4.5
Signed-off-by: Lagrang3 <lagrang3@protonmail.com>

78/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Names security-relevant behavior explicitly
Why it was queued
second-pass: broader security terminology
AI analysis · Moderate 66/100

This commit fixes a crash in the Core Lightning node software. The crash happens when an invoice is deleted while a plugin's 'invoice_payment' hook is still processing a payment that came in through an on-chain fallback address. By the time the hook finishes, the internal data structure it expected to use (the HTLC set) had already been cleared, causing the node to read invalid memory and crash. The fix simply checks whether that data still exists before using it.

Lower-prioritypytest: onchain preimage beats an unfinished outgoing failureby Níckolas Goline · 204d0727 · Aug 13, 2026 · 2 filesMessage 73 · AdequateTriage 0Details
Commit message · Níckolas Goline

pytest: onchain preimage beats an unfinished outgoing failure

A peer can fulfill one HTLC and fail another with the same payment hash,
stop before either removal is final, then claim both onchain: we must
fulfill both incoming HTLCs.

Changelog-None

(cherry picked from commit 2ee1b484f7798050ef4b7b2ba7899699f2aa1ddb)

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Lower-prioritylightningd: don't lock in a dual-funding RBF candidate that was never minedby cdecker · 26e8e7bb · Aug 13, 2026 · 2 filesMessage 91 · StrongTriage 5Details
Commit message · cdecker

lightningd: don't lock in a dual-funding RBF candidate that was never mined

We recorded a confirmed dual-funding open in two steps which ran on
different schedules:

- dual_funding_found() set channel->scid, inline from filter_block_txs()
as each block was added, and
- opening_depth_cb() moved channel->funding (and last_tx/last_sig) over
to the inflight that confirmed -- but that only runs from the
blockdepth watches, which fire from updates_complete(), i.e. only once
we've run out of blocks to fetch.

Every RBF attempt overwrites channel->funding and channel->last_tx with
the newest candidate, so while a node was catching up on blocks it could
sit with a scid from the candidate that was mined and a funding outpoint
naming a completely different one.

A reconnect landing in that window saw the mixed state: peer_restart_dualopend()
derives local_channel_ready from channel->scid != NULL, so dualopend
retransmitted channel_ready, the peer replied, and handle_channel_locked()
committed to channel->funding -- a tx which may never have been mined --
and then cleared every inflight, destroying the last_tx/last_sig for the
candidate that actually confirmed. The channel looked healthy but could
not be closed unilaterally, and the real funding output was no longer
being watched. A peer can drive this deliberately: contribute an input to
the final RBF attempt, double-spend it so it can never confirm, and
reconnect while the victim is catching up (restart, upgrade, stalled
bitcoind).

Do what the splice path already does: record the scid on the inflight
rather than the channel, and promote scid and funding together, in one
callback and one db transaction, once we're deep enough. Clear the
inflight's scid on reorg, which the open path was missing entirely.

Also pick the inflight matching channel->funding on reinit rather than the
list tail -- inflights reload ORDER BY funding_feerate, so after a restart
the tail is the highest-feerate attempt regardless of which one was mined.
And refuse to lock in (and so wipe the inflights) if the funding tx isn't
one we've actually seen on-chain.

As a side effect this also stops a reconnect at depth 1 from locking in a
channel whose minimum_depth is higher, which the scid-based
local_channel_ready flag allowed.

The regression test from #9374 is rewritten rather than kept alongside a
near-duplicate: it detected the window by waiting for the scid to appear
and expected lockin to complete while the node was still catching up,
neither of which holds once the scid only appears together with the
funding outpoint. The replacement covers the same scenario from the
victim's side -- it stalls the node that has to reload its inflights from
the database, so it also exercises the reinit picking the mined inflight
rather than the list tail -- and additionally asserts that the locked-in
channel holds the matching commitment tx and can still be closed
unilaterally.

Reported-by: Ken Sedgwick (@ksedgwic)
Changelog-Fixed: lightningd: dual-funding channels no longer lock in an RBF candidate which was never mined if a reconnect arrives while catching up on blocks.

91/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification✓ Links an issue, advisory, or supporting reference
Why it was queued
fuzzing or regression evidence