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.
Message quality measures whether a commit identifies its scope, purpose, rationale, testing, and supporting references. It does not change the security-severity score.
This is a documentation-only edit. It corrects a misleading comment in the code that wrongly claimed all fee estimates returned to LDK are forced to be at least 253 satoshis per 1000 weight units. The new comment clarifies that this minimu…
This change fixes a bug in Lightning Dev Kit's splicing logic. During a splice, one side can broadcast the new funding transaction as soon as it has the other side's signatures. Previously, if that transaction confirmed on-chain before the…
State-machine inconsistency in channel funding lifecycleMissing chain-source watch for in-flight splice funding transactionPotential failure to send splice_locked after splice confirms during signature exchange
This change fixes how Lightning nodes calculate the financial risk from tiny ('dust') HTLCs when the current on-chain fee rate is higher than the node's own local fee estimate. Previously, the code only considered a buffered fee rate when …
Incorrect fee exposure accounting for dust HTLCsPotential to accept HTLCs whose commitment/HTLC-success fees exceed their value under current feerateEconomic griefing / forced-channel-closure cost manipulation
This is a one-line code cleanup in a test file. It replaces a cloned array literal with a slice reference to silence a Rust compiler lint. There is no change to production code, no security fix, and no functional behavior change.
This is a one-line change in a test file to satisfy a Rust linter warning. It replaces a needless clone of a funding transaction with a reference-based slice construction. There is no functional change, no user-facing behavior change, and …
This commit is a test-only fix for a broken continuous integration (CI) build. It updates a test mock to match a new function signature and rewrites an existing test to use three nodes instead of two so the test scenario remains valid unde…
This change fixes a Lightning channel bug where a malicious peer could renegotiate the closing transaction fee while the local node was still waiting for its own signer to produce the final signature. If allowed, the local node might combi…
State-machine guard expansion to prevent fee renegotiation while a closing signature is pendingRisk of combining mismatched signatures across different closing feesRegression test demonstrates malicious peer renegotiation attempt and expected warning rejection
This change fixes a wallet bug in rust-lightning where a UTXO could be selected for a Lightning funding transaction, then rejected because its previous transaction was too large to fit in a Lightning peer message. Previously, that rejectio…
API change to CoinSelectionSource::select_confirmed_utxos adding max_input_prevtx_serialized_lenWalletSync filters UTXOs by prevtx serialized length before selectionFundingBuilder enforces Lightning tx_add_input message-size limit at selection time
This commit hardens LDK's BOLT 12 payment logic so it refuses to pay invoices containing very large unknown record types (4 billion and up). These records are legal under the Lightning spec, but LDK doesn't understand them, so the change t…
Defensive refusal to pay invoices with unknown high-numbered TLV recordsReuses existing UnknownRequiredFeatures failure path instead of adding a new oneAdds explicit checks before payment state insertion and route construction
This commit fixes a backward-compatibility bug in LDK's BOLT 12 invoice parser. A previous change had capped the range of 'experimental' TLV record types at 4 billion, but the Lightning spec imposes no upper bound. As a result, invoices cr…
Backward-compatibility regression in deserialization of persisted channel monitorsDenial-of-service via unreadable monitor blocking all channel monitoringSpec compliance fix: TLV record types have no upper bound
This change fixes a security issue where a signed text message could be crafted so that its prefixed form looks exactly like a Lightning 'node_announcement' gossip message. Because both use the same double-SHA256 hash and the same signing …
Signature replay / message confusion between signed messages and gossip announcementsForged `node_announcement` signatures via chosen-prefix message constructionNew validation rejects prefixed messages that deserialize as `UnsignedNodeAnnouncement`
This change fixes a corner case in how the Lightning node tries to claim multiple pending HTLCs (small Bitcoin payments locked in a channel) when the wallet cannot fund a single large batch transaction. Previously, if the multi-HTLC batch …
Funds-recovery robustness improvement: prevents premature abandonment of a single unbatched HTLCChange in error-handling arithmetic from checked_sub/saturating_sub with max(1)New unit tests covering both failed and successful singleton HTLC funding paths
This change prevents a Lightning node from accidentally overwriting an archived copy of a channel's security monitor with a brand-new one that happens to use the same identifier. In the old code, if a new channel reused the same identifier…
Data-loss prevention: stops archived ChannelMonitor from being overwritten by a later channel with the same keySafety guard added to both sync and async persistence pathsPersistence refusal surfaces as InProgress/UnrecoverableError rather than silent overwrite
This change fixes a place in the Lightning payment routing code where adding up fees could overflow the maximum number a computer can store in a 64-bit integer. Previously, the code assumed this could never happen and would crash (panic) i…
Integer overflow in fee computationPreviously unreachable!() panic path reachableMPP path merge could trigger overflow
This commit fixes a bug where a Lightning node could get stuck after restarting. If the node crashed or restarted while it was still saving the initial channel monitor to disk, and that save later finished in another process, the restarted…
Fixes a state-machine stall on node reload that could leave channels non-functionalRemoves an overstrict assertion that would panic on a legitimate post-reload stateAdds explicit detection of monitor persistence completed in a prior process
This change only updates documentation and code comments in the Lightning Dev Kit library. It clarifies that a particular key-derivation setting is fixed when a channel is first opened and is not changed by splicing. No code behavior was a…
This commit only changes documentation comments in two source files. It corrects the wording of how certain public keys are derived in the Lightning protocol and adds details about which witness script a signer must use when creating justi…
Documentation-only changeClarifies key derivation semantics for Lightning commitment transactionsClarifies justice transaction witness script requirements for signers
This change only adds documentation comments to a Rust struct. It does not modify any executable code, so it cannot by itself introduce or fix a security vulnerability. The new text warns developers that using TokioSpawner incorrectly can …
This commit hardens how Lightning Dev Kit handles custom signing modules. Previously, LDK relied on each custom signer to check that the other party's signatures on a holder commitment transaction were valid. The change adds a ready-made v…
New synchronous signature-verification helper for holder commitment transactionsTrait documentation now mandates verification before Ok(()) because LDK acts immediatelyInMemorySigner now validates that holder funding key belongs to signer before signature checks
This update fixes a corner case in the Lightning Dev Kit where a node could get confused if it received a 'channel_ready' message while still waiting for its own signer to produce the first commitment signature. The patch makes the node re…
State-machine confusion between funding_signed and channel_ready in async signer flowPremature channel_ready could advance counterparty_next_commitment_point before initial commitment is signedPatch closes channel rather than allowing inconsistent commitment state
Expand any commit for its author, full message, clarity score, changed files, triage signals, analysis, and source link.
Security candidateMerge PR 'Advise extract_tx_unchecked_fee_rate in sign_psbt docs' (#5599)by Matt Corallo · 75d8ba2c · Nov 16, 2026 · 1 fileMessage 81 · StrongInformational 18Details
Commit message · Matt Corallo
Merge PR 'Advise extract_tx_unchecked_fee_rate in sign_psbt docs' (#5599)
from bot/5594-sign_psbt-docs-advise-extract_tx-cd8cd5 into main
Reviewed-on: https://git.rust-bitcoin.org/lightningdevkit/rust-lightning/pulls/5599 Reviewed-by: Matt Corallo <matt@noreply.git.rust-bitcoin.org>
81/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference
Why it was queued
signing boundarysigning or wallet pathmerge-commit duplicate discount
AI analysis · Informational 18/100
This change only updates documentation comments for the sign_psbt methods in wallet utilities. It advises developers to use extract_tx_unchecked_fee_rate() instead of extract_tx() when signing PSBTs outside the library, because extract_tx() can reject transactions with very high fee rates that are legitimate in Lightning child-pays-for-parent fee-bumping scenarios. It is a documentation-only fix with no code behavior change.
Security candidateAdvise extract_tx_unchecked_fee_rate in sign_psbt docsby auto-pr-bot · 7bdcb4f0 · Nov 16, 2026 · 1 fileMessage 81 · StrongModerate 60Details
Commit message · auto-pr-bot
Advise extract_tx_unchecked_fee_rate in sign_psbt docs
The sign_psbt() doc comments on CoinSelectionSource, WalletSource and their synchronous counterparts told wallet implementors to call psbt.extract_tx() to get the transaction to sign. Since the rust-bitcoin 0.31 upgrade (a8bd4c097f7a, first released in v0.0.124-beta) that method rejects transactions paying more than 25,000 sat/vB, and LDK's own callers were switched to extract_tx_unchecked_fee_rate() at the same time while the docs were left behind.
The transactions handed to sign_psbt() can legitimately carry a fee above that cap: the anchor CPFP child LDK builds for a ChannelClose event folds the commitment transaction's fee into its own input value, so its fee pays for the whole package and its own feerate exceeds 25,000 sat/vB once the commitment is large enough (e.g. ~146 sat/vB target with 483 pending HTLCs). A wallet written as documented then fails sign_psbt() and the force-close is never broadcast.
Point implementors at extract_tx_unchecked_fee_rate() instead, and warn against extract_tx() so they don't "fix" it back.
@matt asked:
> @auto-pr-bot can you change the docs to fix this?
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference
Why it was queued
signing boundarysigning or wallet path
AI analysis · Moderate 60/100
This commit only updates documentation comments in LDK's wallet utility code. It tells wallet developers not to use a standard Bitcoin library method (psbt.extract_tx()) when implementing the sign_psbt() function, because that method rejects transactions with very high fees. In certain legitimate Lightning scenarios—like a child transaction paying fees for both itself and its parent force-close transaction—the fee rate can exceed the library's cap. Using the wrong method would cause the wallet to refuse to sign, preventing a force-close transaction from being broadcast. The commit itself does not change any code behavior, only the guidance given to implementers.
Security candidateRelease the monitor-set lock before sync event callbacksby auto-pr-bot · c587b847 · Nov 15, 2026 · 1 fileMessage 91 · StrongModerate 64Details
Commit message · auto-pr-bot
Release the monitor-set lock before sync event callbacks
@matt asked in #5589:
> @auto-pr-bot please fix this issue reported by project loupe > > ## Description > > The synchronous EventsProvider implementation holds > self.monitors.read() throughout each > ChannelMonitor::process_pending_events call, including the application > callback. Both its documentation and EventsProvider explicitly permit > callbacks to re-enter the provider. A callback that flushes a queued > new monitor acquires flush_lock and pending_ops, then > watch_channel_internal waits for self.monitors.write(). The same > thread still owns the outer read guard and cannot release it until the > callback returns, so production deadlocks. The blocked flush also > retains the global operation-queue lock, preventing subsequent > deferred monitor updates. > > [...] > > Exploitation is integration-dependent: an application must use > synchronous event handling and perform a checkpoint/flush from its > event callback (or another operation requiring the monitor-set write > lock). A channel counterparty can trigger that callback through an > on-chain close producing SpendableOutputs, while another registration > is queued. This stalls event processing and monitor-update flushing; > if processing remains stalled, time-sensitive claim handling can be > affected.
`process_pending_events_async` already re-acquires the monitors read lock around each monitor's event processing instead of holding it across the handler; this applies the same structure to the synchronous `EventsProvider` implementation, using the shared `process_events_body!` macro. A regression test queues a monitor registration and flushes it from the event handler, which the test lock checker detects as a deadlock on the previous code.
✓ 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
explicit security languagefuzzing or regression evidence
AI analysis · Moderate 64/100
This commit fixes a deadlock bug in the rust-lightning library's ChainMonitor. When an application handled certain blockchain events synchronously, the library held a read lock while calling the application's handler. If that handler tried to flush a newly queued channel monitor, it needed a write lock on the same data structure, which the same thread still held as a read lock. This caused a self-deadlock, stalling event processing and time-sensitive on-chain claim handling. The fix releases the read lock before invoking the application callback and re-acquires it afterward, mirroring how the asynchronous event path already worked. A regression test confirms the previously deadlocking scenario now succeeds.
AI review queuedPass the initial counterparty commit tx to `ChannelMonitor::new`by Matt Corallo · 4a272b62 · Nov 13, 2026 · 2 filesMessage 83 · StrongLow 31Details
Commit message · Matt Corallo
Pass the initial counterparty commit tx to `ChannelMonitor::new`
For some time now we've required the initial counterparty commitment tx to be provided to `ChannelMonitor`s immediately. With a recent change we started panic'ing if we failed to do so before serializing a `ChannelMonitor`, which broke a `--cfg` flag test.
Here we fix this by requiring the initial commitment transaction by API in `ChannelMonitor::new`.
83/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
Why it was queued
second-pass: broader security terminology
AI analysis · Low 31/100
This commit fixes an internal consistency problem in how a new Lightning channel's first monitoring data is built. Previously, the code created a ChannelMonitor first and then separately supplied the counterparty's initial commitment transaction. A recent change made the monitor panic if it was saved to disk before that transaction was supplied. The fix requires the transaction to be passed directly into ChannelMonitor::new, eliminating a window where the monitor could be incomplete. It is a robustness/API-cleanup fix rather than an externally exploitable vulnerability.
Security candidateUse zero splice min-depth in zero-conf splice reorg testby Matt Corallo · 8bd6e170 · Nov 12, 2026 · 1 fileMessage 83 · StrongInformational 15Details
Commit message · Matt Corallo
Use zero splice min-depth in zero-conf splice reorg test
`test_zero_conf_splice_stays_locked_when_unconfirmed` relies on a zero-conf splice sending `splice_locked` as soon as it is signed. Since splices on zero-conf channels now wait for `inbound_splice_min_depth` and `outbound_splice_min_depth` (both defaulting to 6), the test's splice no longer locked at signing and it failed waiting for the `splice_locked` message.
The test landed concurrently with the min-depth knobs, so it missed the update applied to the other zero-conf splice tests. Set both knobs to 0 as those tests do.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
83/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
Why it was queued
signing boundary
AI analysis · Informational 15/100
This commit only fixes a test that was failing because of a recent unrelated change. It does not change any production code or fix a security issue. The test now explicitly sets two new configuration knobs to zero so the test scenario behaves as originally intended.
Security candidateMerge PR 'Fix HTLC loss when a closed channel's ID is reused in open_channel' (#5562)by Matt Corallo · 7ac88a11 · Nov 11, 2026 · 2 filesMessage 81 · StrongHigh 76Details
Commit message · Matt Corallo
Merge PR 'Fix HTLC loss when a closed channel's ID is reused in open_channel' (#5562)
from auto-pr-bot/bot/254-peer-can-steal-forwarded-htlcs-b-d76f84 into main
Reviewed-on: https://git.rust-bitcoin.org/lightningdevkit/rust-lightning/pulls/5562 Reviewed-by: Matt Corallo <matt@noreply.git.rust-bitcoin.org>
81/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference
Why it was queued
boot or update pathmerge-commit duplicate discount
AI analysis · High 76/100
This patch fixes a bug in the Lightning Dev Kit where a forwarded payment (HTLC) could be permanently lost if a new channel reused the same temporary ID as a recently closed channel. Previously, the code could look up the new, unfunded channel instead of the closed one, skip writing the payment secret (preimage) to the closed channel's on-chain safety copy (ChannelMonitor), and let the payment expire unclaimed. The fix both rejects incoming channel open attempts that reuse such an ID and ensures claims still reach the correct closed channel's monitor even if an unfunded channel exists under the same ID.
AI review queuedMerge PR 'Reject RAA before our commitment_signed has been sent' (#5561)by Matt Corallo · 1f1fd3f1 · Nov 11, 2026 · 4 filesMessage 81 · StrongModerate 68Details
Commit message · Matt Corallo
Merge PR 'Reject RAA before our commitment_signed has been sent' (#5561)
from auto-pr-bot/bot/345-raa-before-our-commitment_signed-94d9f9 into main
Reviewed-on: https://git.rust-bitcoin.org/lightningdevkit/rust-lightning/pulls/5561 Reviewed-by: Matt Corallo <matt@noreply.git.rust-bitcoin.org>
81/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference
Why it was queued
signing or wallet pathmerge-commit duplicate discountsecond-pass: security-sensitive path
AI analysis · Moderate 68/100
This commit fixes a bug in the Lightning Dev Kit where a node could incorrectly accept a 'revoke_and_ack' message from its counterparty before it had actually sent out a new commitment transaction. Under the right timing conditions, this could cause the node to sign a commitment that its own channel monitor had never been told about, potentially leaving it unable to recover funds or claim HTLCs if that commitment later confirmed on-chain. The fix adds extra state checks so the node rejects such premature messages and closes the channel instead.
AI review queuedMerge PR 'Verify 64-byte transaction inclusion via coinbase-anchored Merkle depth' (#5559)by Matt Corallo · aa895b5e · Nov 11, 2026 · 4 filesMessage 91 · StrongModerate 59Details
from auto-pr-bot/bot/203-accept-genuine-mined-64-base-byt-41f97b into main
Reviewed-on: https://git.rust-bitcoin.org/lightningdevkit/rust-lightning/pulls/5559 Reviewed-by: Matt Corallo <matt@noreply.git.rust-bitcoin.org>
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
signing or wallet pathmerge-commit duplicate discountsecond-pass: security-sensitive path
AI analysis · Moderate 59/100
This change removes a safety check that previously threw away Bitcoin transactions whose stripped-down form is exactly 64 bytes. That check was meant to guard against a rare Merkle-tree trick, but it also accidentally discarded legitimate Lightning HTLC claim transactions of the same size, which could stop a node from learning a payment secret (preimage) needed to settle a forwarded payment. The patch now verifies those 64-byte transactions normally using the block's Merkle root, so real transactions are accepted while fake ones are still rejected.
AI review queuedMerge PR 'Preserve conflicting output watches' (#5557)by Matt Corallo · e68ee7d2 · Nov 11, 2026 · 4 filesMessage 81 · StrongModerate 61Details
from tnull/2026-10-preserve-output-watches into main
Reviewed-on: https://git.rust-bitcoin.org/lightningdevkit/rust-lightning/pulls/5557 Reviewed-by: Matt Corallo <matt@noreply.git.rust-bitcoin.org>
81/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference
Why it was queued
signing or wallet pathmerge-commit duplicate discountsecond-pass: security-sensitive path
AI analysis · Moderate 61/100
This change fixes a bug in how the Lightning Dev Kit's transaction-sync clients (Electrum and Esplora) keep track of watched Bitcoin outputs. Previously, if the same output was registered more than once with different script pubkeys (for example, one real and one bogus), the later registration would overwrite the earlier one. This could cause the client to stop monitoring the real output, potentially missing when it is spent on-chain. The fix stores all registered script pubkeys for each output instead of keeping only the last one, so no conflicting watch can hide a legitimate spend.
Security candidateMerge PR 'Handle claim replay for payments which reused a payment hash' (#5541)by Matt Corallo · 55ce2abd · Nov 10, 2026 · 3 filesMessage 81 · StrongModerate 58Details
Commit message · Matt Corallo
Merge PR 'Handle claim replay for payments which reused a payment hash' (#5541)
from 2026-11-reused-payment-claim-replay into main
Reviewed-on: https://git.rust-bitcoin.org/lightningdevkit/rust-lightning/pulls/5541 Reviewed-by: Val Wallace <val@noreply.git.rust-bitcoin.org>
81/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference
Why it was queued
boot or update pathmerge-commit duplicate discount
AI analysis · Moderate 58/100
This commit fixes a bug in the Lightning Dev Kit where the node could confuse two different payments that reused the same payment hash. Previously, completing an old multi-part payment could incorrectly trigger a 'payment received' event for a newer payment, or a restart could fail to replay all owed 'payment received' events. The fix tags each completion action with the payment's unique internal ID so events are only generated for the correct payment.
AI review queuedMerge PR 'Don't panic on splice txs confirming with empty witnesses' (#5536)by Matt Corallo · 088c6840 · Nov 10, 2026 · 1 fileMessage 81 · StrongModerate 57Details
Commit message · Matt Corallo
Merge PR 'Don't panic on splice txs confirming with empty witnesses' (#5536)
This patch fixes a crash (panic) in the Lightning Dev Kit's channel handling code. Previously, the code assumed that any outbound funding transaction was built by the user, and it would panic if the transaction had an empty witness. Splice transactions are also outbound but are built internally, so the old assumption was wrong. The fix adds a check to only panic for user-built funding transactions, and instead return a normal processing error for internally-built splice transactions that don't match expectations.
Security candidateHandle claim replay for payments which reused a payment hashby Matt Corallo · c2020bca · Nov 10, 2026 · 3 filesMessage 85 · StrongModerate 66Details
Commit message · Matt Corallo
Handle claim replay for payments which reused a payment hash
A payment hash may be paid, and claimed, more than once, leaving several claims for it in a `ChannelMonitor`. On `ChannelManager` load we replayed such claims matching them against `claimable_payments` and `pending_claiming_payments` only by payment hash. As a result:
* if the first replayed claim's `PaymentClaimed` was delayed (the channel was closed or had a `ChannelMonitorUpdate` in flight), the second claim's replay found its `pending_claiming_payments` entry and `ChannelManager::read` failed on every startup, * a different, unclaimed, payment with the same payment hash was dropped from `claimable_payments` and reported as claimed without its HTLCs being claimed.
Because a replayed claim is durably in a `ChannelMonitor`, and thus replayed again on the next startup, we don't need to wait on its `ChannelMonitorUpdate`s to generate the `PaymentClaimed`. Thus, we now generate it immediately and no longer track replayed claims in `pending_claiming_payments`. We also only drop a payment from `claimable_payments` if it shares an HTLC with the replayed claim, i.e. it is a stale copy of the claimed payment.
Further, `MonitorUpdateCompletionAction::PaymentClaimed` identified its payment only by payment hash, so an action completing after a different payment with the same payment hash began being claimed generated that payment's `PaymentClaimed` before its preimage was durable. It now carries the claim's `PaymentId` and only generates the event for a matching payment.
Note that a `ChannelManager` reloaded again before its startup `ChannelMonitorUpdate`s complete now generates another redundant preimage update for each closed channel in a replayed claim.
Thanks to Erick Cestari for reporting this issue.
Co-Authored-By: Claude <noreply@anthropic.com>
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
boot or update path
AI analysis · Moderate 66/100
This commit fixes a bug in LDK (a Lightning Network implementation in Rust) where the same payment hash could be used for multiple payments. On restart, the software could either crash repeatedly or incorrectly mark a different, unclaimed payment as already claimed. The fix makes sure each payment is tracked by its unique ID, not just by its payment hash, so claims are replayed correctly after a restart.
AI review queuedDon't panic on splice txs confirming with empty witnessesby Matt Corallo · e80e5653 · Nov 10, 2026 · 1 fileMessage 73 · AdequateModerate 60Details
Commit message · Matt Corallo
Don't panic on splice txs confirming with empty witnesses
When a funding transaction of an outbound channel confirms, we do some sanity-checks and panic if it appears the user used an unsafe funding transaction. Sadly, we retained these panics for outbound channels when a splice funding confirms, which is incorrect as our counterparty may have added the inputs we're looking at.
Thanks to Erick Cestari for reporting this issue.
73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
second-pass: broader security terminology
AI analysis · Moderate 60/100
This fix stops a Lightning node from crashing when a special type of channel upgrade transaction called a 'splice' confirms on the Bitcoin blockchain. Before the fix, the node would panic and shut down because it wrongly applied a safety check meant for regular outbound channels to splice transactions, where the other party may have supplied inputs. A malicious or buggy counterparty could potentially trigger this panic, causing a denial of service by crashing the victim's node.
AI review queuedMerge PR 'Reject closing_signed while a fee update remains pending' (#5533)by Matt Corallo · dd658f22 · Nov 10, 2026 · 2 filesMessage 81 · StrongModerate 60Details
Commit message · Matt Corallo
Merge PR 'Reject closing_signed while a fee update remains pending' (#5533)
from tankyleo/leo/2026-10-panic-on-closing-signed into main
Reviewed-on: https://git.rust-bitcoin.org/lightningdevkit/rust-lightning/pulls/5533 Reviewed-by: Matt Corallo <matt@noreply.git.rust-bitcoin.org>
81/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference
This change fixes a bug in the Lightning Dev Kit where a Bitcoin Lightning channel could panic (crash) if a 'closing_signed' message was processed while a fee update was still pending. The fix rejects such messages and closes the channel gracefully instead of crashing. The test names and code confirm the previous behavior could cause a panic.
AI review queuedMerge PR 'Drop accepted closing_signed state on peer disconnection' (#5532)by Matt Corallo · 87c2743c · Nov 10, 2026 · 2 filesMessage 81 · StrongModerate 59Details
Commit message · Matt Corallo
Merge PR 'Drop accepted closing_signed state on peer disconnection' (#5532)
from auto-pr-bot/bot/223-preserve-accepted-closing-signat-87d4ef into main
Reviewed-on: https://git.rust-bitcoin.org/lightningdevkit/rust-lightning/pulls/5532 Reviewed-by: Matt Corallo <matt@noreply.git.rust-bitcoin.org>
81/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference
Why it was queued
signing or wallet pathmerge-commit duplicate discountsecond-pass: security-sensitive path
AI analysis · Moderate 59/100
This patch fixes a state-handling bug during Lightning channel close negotiations. If a user's signing device was slow or offline and the peer disconnected in the middle, the node could later combine an old accepted fee with a freshly proposed fee, potentially broadcasting an unintended closing transaction. The fix clears the stale 'closing_signed' state when the peer reconnects, forcing the negotiation to restart cleanly.
from auto-pr-bot/bot/207-bound-channel-handler-gossip-que-30dc42 into main
Reviewed-on: https://git.rust-bitcoin.org/lightningdevkit/rust-lightning/pulls/5529 Reviewed-by: Matt Corallo <matt@noreply.git.rust-bitcoin.org>
81/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference
Why it was queued
signing boundarymerge-commit duplicate discount
AI analysis · Moderate 52/100
This change prevents a Lightning node from repeatedly broadcasting the same channel announcement if a peer keeps replaying a specific protocol message (announcement_signatures). Before the fix, a malicious or buggy peer could make the node generate and flood fresh channel_announcement broadcasts, wasting bandwidth and gossip buffer space across the network. The patch adds a flag so only the first processed announcement_signatures triggers a broadcast, with one deliberate exception after a node restart to preserve reliability.
Security candidateMerge PR 'Include recovery ID in invoice signature ordering' (#5516)by Matt Corallo · 5653142a · Nov 6, 2026 · 1 fileMessage 86 · StrongLow 42Details
Commit message · Matt Corallo
Merge PR 'Include recovery ID in invoice signature ordering' (#5516)
from tankyleo/leo/ord-bolt11invoicesignature into main
Reviewed-on: https://git.rust-bitcoin.org/lightningdevkit/rust-lightning/pulls/5516 Reviewed-by: Matt Corallo <matt@noreply.git.rust-bitcoin.org>
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
signing boundarymerge-commit duplicate discount
AI analysis · Low 42/100
This change fixes how Lightning invoices are sorted when they contain signatures. Previously, two invoices that differed only by their 'recovery ID' (a small extra number attached to a signature) were treated as equal during sorting. That could cause inconsistent ordering, duplicate entries, or subtle logic bugs in code that relies on sorted invoice collections. The patch now includes the recovery ID in the comparison so signatures are ordered correctly and consistently.
AI review queuedMerge PR 'Return an empty witness for P2A anchor inputs' (#5510)by Matt Corallo · 6a70008b · Nov 6, 2026 · 1 fileMessage 81 · StrongLow 33Details
Commit message · Matt Corallo
Merge PR 'Return an empty witness for P2A anchor inputs' (#5510)
from auto-pr-bot/bot/184-anchordescriptor-returns-non-sta-5472ff into main
Reviewed-on: https://git.rust-bitcoin.org/lightningdevkit/rust-lightning/pulls/5510 Reviewed-by: Matt Corallo <matt@noreply.git.rust-bitcoin.org>
81/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference
Why it was queued
signing or wallet pathmerge-commit duplicate discountsecond-pass: security-sensitive path
AI analysis · Low 33/100
This commit fixes how a specific type of Bitcoin transaction input (used in fee-bumping anchors) builds its witness data. Previously it created a witness containing a single empty element; now it creates a truly empty witness. The change is subtle but important because Bitcoin consensus rules treat these two forms differently for a new output type (P2A). The included test confirms the witness is now empty.
AI review queuedMerge PR 'Keep a zero-conf splice locked when its funding is unconfirmed' (#5505)by Matt Corallo · f42f24d4 · Nov 5, 2026 · 2 filesMessage 81 · StrongModerate 55Details
Commit message · Matt Corallo
Merge PR 'Keep a zero-conf splice locked when its funding is unconfirmed' (#5505)
from jkczyz/2026-10-0conf-splice-unconfirm-panic into main
Reviewed-on: https://git.rust-bitcoin.org/lightningdevkit/rust-lightning/pulls/5505 Reviewed-by: Matt Corallo <matt@noreply.git.rust-bitcoin.org>
81/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference
This patch fixes a logic bug in how the Lightning node handles zero-confirmation splice transactions when they are temporarily kicked out of the blockchain by a reorganization. Previously, the code would incorrectly clear the 'splice_locked' state for a zero-conf splice when its funding transaction became unconfirmed, which could cause the node to resend splice_locked messages or panic. The fix keeps zero-conf splices locked even if the funding transaction is unconfirmed, matching the behavior of zero-conf channels. The commit title and test comments explicitly describe this as preventing a panic and incorrect re-signaling.
AI review queuedAbandon claims of irrevocably spent HTLC outputsby SaidAlaoui · f7da7601 · Nov 5, 2026 · 6 filesMessage 80 · StrongModerate 57Details
Commit message · SaidAlaoui
Abandon claims of irrevocably spent HTLC outputs
When a `ChannelMonitor` learns a preimage after a commitment transaction confirms, it builds the claims of all HTLC outputs on that transaction again. It removes duplicates only against the outpoints which it still tracks. Once the spend of an HTLC output has `ANTI_REORG_DELAY` confirmations, the outpoint is no longer tracked, so the claim is registered again. `ChannelManager::read` replays stored preimages on every load, so a restart is enough to create such a claim. The claim can never confirm, but it stays in the monitor and we yield it again on every rebroadcast.
On every block, `ChannelMonitor` now passes the outputs of the confirmed commitment transaction which have an irrevocable spend to `OnchainTxHandler::abandon_spent_outpoints`. A spend is irrevocable when its HTLC is in `htlcs_resolved_on_chain`, or when its `HTLCSpendConfirmation` has `ANTI_REORG_DELAY` confirmations. The second case covers our own HTLC-Success transactions on our commitment transaction, which wait for the CSV delay before their HTLC is in `htlcs_resolved_on_chain`. A claim which only spends such outputs is dropped, along with the `claimable_outpoints` entries of any outpoints split out of it earlier, which would otherwise make us panic if we saw their spends again. A claim which also spends other outputs is split, and its timer is set to the current height, so that we build the claim of the other outputs again in the same block. This also removes such claims from monitors which were persisted with them.
This also drops the HTLC-Timeout claims of non-anchor channels for HTLC outputs which our counterparty claimed with the preimage. Those packages cannot be split, so they stayed in `locktimed_packages`, and we broadcast an HTLC-Timeout transaction which could never confirm at the HTLC expiry. `test_htlc_on_chain_success` and `retry_with_no_persist` expected those broadcasts.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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 57/100
This commit fixes a bug in the Lightning Dev Kit where the wallet could keep trying to claim bitcoin that was already spent by someone else. After a channel closes on-chain, the code normally tries to grab any HTLC outputs it can. A bug caused it to recreate already-impossible claims every time it learned a new payment secret or restarted, because it only avoided duplicate claims for outputs it was still actively tracking. Once an output's spend was buried under enough confirmations, it was dropped from tracking, so the old claim was added again. These impossible claims could never confirm, but they stayed in the monitor forever and were re-broadcast repeatedly. In rare cases they could also trigger a panic if a previously-split claim later saw its output spent again. The fix detects outputs that are already irreversibly spent and tells the on-chain transaction handler to abandon those claims, splitting or dropping them as needed.
✓ 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
access controlmerge-commit duplicate discount
AI analysis · Low 35/100
This small patch fixes a state-persistence bug in a Lightning service feature (LSPS2). When a funding transaction or broadcast authorization was recorded, the code forgot to mark the peer's state as needing to be saved to disk. That could let the in-memory change disappear after a restart, potentially causing the node to lose track of money-moving transactions or re-broadcast at the wrong time. It is a reliability/consistency fix rather than an obvious remote exploit.
AI review queuedMerge PR 'Verify UTXO output matches previous transaction in coin selection' (#5490)by wpaulino · f23b996c · Nov 5, 2026 · 1 fileMessage 91 · StrongModerate 59Details
✓ 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
signing or wallet pathmerge-commit duplicate discountsecond-pass: security-sensitive path
AI analysis · Moderate 59/100
This change tightens a safety check when a Lightning wallet picks which Bitcoin coins (UTXOs) to spend. Previously, the code only confirmed that the referenced transaction had an output at the expected position. Now it also confirms that the actual output amount and script exactly match what the wallet claims. This prevents a class of bugs or attacks where a wallet source provides a UTXO whose details do not match the real previous transaction, which could lead to building invalid or unexpected funding/closing transactions.
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference
Why it was queued
memory safetymerge-commit duplicate discount
AI analysis · Moderate 58/100
This patch fixes a place where two numbers representing the size of a Bitcoin transaction input were added together using normal addition, which could silently overflow and wrap around to a tiny value in Rust. By switching to checked addition, the code now treats an overflow as a failure case and falls back to a maximum fee, preventing a malformed or extremely large UTXO from causing an underpriced fee estimate. The practical security impact is moderate: it could let an attacker-provided UTXO slip past a reserve check, but the surrounding code has other safeguards and the scenario requires a very large, crafted satisfaction_weight.
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference
Why it was queued
boot or update pathmerge-commit duplicate discount
AI analysis · Moderate 52/100
This commit changes how Lightning Dev Kit handles payment claims when an outbound HTLC is resolved. Previously, off-chain payment claims were tied to a specific message-handling flow (RAA release) and could get out of sync with the channel monitor's durable events. The patch makes monitor events the durable source of truth for resolving outbound payments, adds tracking so the same HTLC can have both an off-chain and an on-chain claim event, and ensures older LDK versions (0.3 and earlier) don't misinterpret off-chain events as on-chain ones. It also fixes edge cases around restarts, upgrades, downgrades, and replayed events. The primary risk is not a remote exploit but a correctness/consensus bug that could, in edge cases, lead to stuck payments, phantom balances, or premature payment completion.
Security candidateLSPS2: Release pruned pending requests from the total limitby auto-pr-bot · 0d95586c · Nov 5, 2026 · 2 filesMessage 83 · StrongHigh 76Details
Commit message · auto-pr-bot
LSPS2: Release pruned pending requests from the total limit
The LSPS2 service counts unanswered `get_info`/`buy` requests in a global `total_pending_requests` counter and refuses new requests from any peer once it reaches `MAX_TOTAL_PENDING_REQUESTS`. When a peer disconnected, its pending requests were dropped from the per-peer map by `prune_pending_requests` without lowering the counter, so every request still unanswered at disconnect permanently consumed one of the 1,000 global slots until the process restarted. A peer with throw-away node keys could thus pin an LSP at the limit and refuse `lsps2.get_info` and `lsps2.buy` to all clients, and ordinary clients that lost their connection before being answered drifted the counter upward, too.
Have `prune_pending_requests` return how many entries it removed (the same shape LSPS1's already has) and subtract that from the counter in `peer_disconnected`, using the same saturating `fetch_update` and out-of-sync `debug_assert!` idiom as `remove_pending_request`. `peer_disconnected` is the only caller of `prune_pending_requests`, and together with `remove_pending_request` this covers every removal from `pending_requests`, so the counter stays in sync with the per-peer maps as `verify_pending_request_counter` asserts.
Reported by Anthropic's OSS Scanner as ANT-2026-S58419MV and independently by Erick Cestari.
@tnull asked:
> @auto-pr-bot please fix this, including in the commit message that > this was reported by Anthropic's OSS Scanner, as ANT-2026-S58419MV. > > Release requests pruned in peer_disconnected from > total_pending_requests, keeping the counter in sync with what > prune_pending_requests removes. Add a regression test that fails > without the fix.
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
Why it was queued
access controlfuzzing or regression evidence
AI analysis · High 76/100
This commit fixes a denial-of-service bug in the LSPS2 (Lightning Service Provider Specification 2) service code. The service tracks how many unanswered client requests it has globally and stops accepting new ones after 1,000. When a client disconnected before being answered, the per-client request list was cleaned up, but the global counter was not reduced. That meant every such request permanently consumed one of the 1,000 slots until the program restarted. An attacker could repeatedly connect, send a request, and disconnect to exhaust the slot limit, blocking legitimate clients from using the service. The fix makes the cleanup routine report how many requests it removed and subtracts that from the global counter when a peer disconnects. A regression test is included.