This week’s newsletter describes a vulnerability affecting older versions of
Bitcoin Core, summarizes the disclosure of a denial-of-service vulnerability in
Core Lightning, and relays discussion about refreshing the BIP editor team.
Also included are our regular sections with selected questions and answers
from the Bitcoin Stack Exchange, announcements of new releases and release
candidates, and descriptions of notable changes to popular Bitcoin
infrastructure software.
News
-
● Disclosure of a medium-severity vulnerability in Bitcoin Core: Greg
Sanders posted to the Bitcoin-Dev mailing list a Bitcoin
Core security advisory for a vulnerability that
allowed a peer to temporarily stop a node from processing blocks and
transactions. It affects all 29.x releases, 30.x before 30.5,
and 31.x before 31.3. Version 32.1 already includes the fix.
The 29.x series has reached end of life and will not receive a fix, so its
users should upgrade to a maintained release.Bitcoin Core stores transactions whose parents it has not yet seen, called
orphans. Since 29.0, each time a peer announced the wtxid of a stored
orphan, the node checked every parent of that orphan against its mempool
and its filters of recently seen transactions. Aninvmessage can contain
up to 50,000 announcements, and duplicates were not skipped. An attacker
could send an orphan with thousands of missing parents, followed byinv
messages repeating its wtxid 50,000 times. According to the advisory, each
such message stalled the node for over a dozen seconds, during which it
processed no messages from other peers, including blocks. Bitcoin Core
#35878 now processes each announced transaction only once perinv
message.The vulnerability was discovered in July by Project Loupe, responsibly
disclosed by Sanders, and independently
reported by stutxo in August. Because it was classified as easily
discoverable (see Newsletter #429), the advisory was
published alongside 30.5 and 31.3. -
● Disclosure of a DoS vulnerability in CLN: Nishant Bansal posted to Delving Bitcoin the responsible disclosure of a denial-of-service (DoS) vulnerability in Core Lightning
(CLN) affecting versions 0.12.0 (August 2022) through
26.06.7 (August 2026), which allowed an attacker to repeatedly
crash a victim’s node. The bug gave an attacker no direct access to funds,
but continuously crashing a node could put its channel funds at risk. Users
are recommended to upgrade to the latest version immediately. The
vulnerability was fixed in CLN version 26.06.8 (see Newsletter #424).The vulnerability was related to more than one v1 channel sharing the same
channel_id. A malicious peer could open a channel by providing another
channel’s funding outpoint. Sincechannel_idis derived from that outpoint,
according to BOLT2, two channels would thus have matching IDs. CLN runs a
channeldsubdaemon for each channel, whileconnectdroutes messages to
the correct subdaemon based on theirchannel_id. Since CLN assumes the
uniqueness ofchannel_id, collisions led the node to crash.There were two ways a malicious peer could crash the node, one during
reconnection, detected using smite, a snapshot fuzzing framework
for Lightning Network implementations, and the other on channel closure,
found by developer Eugene Siegel:-
When a peer reconnects, the main daemon,
lightningd, starts the
channeldsubdaemons and hands them toconnectd. On the first
channel_idlookup everything would work fine. However, on the second
request anassertproving that the connection was not already active
would abortconnectd, taking down the node. Since both channels were
still present in the database after a restart, a new reconnection attempt
would crash the node again. -
CLN keeps in memory previously closed channels in a hash table keyed by
channel_id. An attacker closing a channel with the samechannel_idas
one already closed would trigger the failure of an assertion checking that
no duplicates were added to the map. Unlike the first variant, the node
then crashes on every restart without further action from the attacker,
until it is upgraded. This specific attack vector affected only versions
25.05 and higher.
-
-
● Discussion on refreshing BIP editors: Mark “Murch” Erhardt
posted to the Bitcoin-Dev mailing list to resurface
his April proposal to refresh the BIP editor team (see Newsletters
#299 and #418 for previous
coverage of the editor set), citing a backlog of submissions awaiting
editor review in the BIPs repository. He described two
options, adding active editors or lowering standards so that editors check
only the format of new submissions, and strongly preferred refreshing the
team to three editors who all contribute regularly. He added that
volunteers wary of an open-ended commitment could offer to serve a limited
term, such as 12 to 24 months. Following the post, several people
volunteered, and current editor Olaoluwa Osuntokun indicated he plans to
step down at the end of the year. Discussion was ongoing at the time of
writing.
Selected Q&A from Bitcoin Stack Exchange
Bitcoin Stack Exchange is one of the first places Optech
contributors look for answers to their questions—or when we have a
few spare moments to help curious or confused users. In
this monthly feature, we highlight some of the top-voted questions and
answers posted since our last update.
Releases and release candidates
New releases and release candidates for popular Bitcoin infrastructure
projects. Please consider upgrading to new releases or helping to test
release candidates.
- ● Bitcoin Core 31.3 and 30.5 are maintenance releases
of the predominant full node implementation. Both fix the DoS vulnerability
described above.
Notable code and documentation changes
Notable recent changes in Bitcoin Core, Core
Lightning, Eclair, LDK,
LND, libsecp256k1, Hardware Wallet
Interface (HWI), Rust Bitcoin, BTCPay
Server, BDK, Bitcoin Improvement
Proposals (BIPs), Lightning BOLTs,
Lightning BLIPs, Bitcoin Inquisition, and BINANAs.
-
● Bitcoin Core #36387 deprecates the
encryptwalletRPC, which encrypts an
existing unencrypted wallet. The RPC now requires Bitcoin Core to be started
with the-deprecatedrpc=encryptwalletflag and is scheduled for removal in
a future major release. Encrypting an existing wallet cannot guarantee
removal of unencrypted private-key material from disk. It can also generate a
new seed, so earlier backups may not be able to recover funds
sent to newly generated addresses. Users who want to encrypt their wallet
should instead create an encrypted wallet by supplying thepassphrase
argument tocreatewallet(see Newsletter #47).
Existing encrypted wallets remain supported. -
● BIPs #2301 adds draft BIP333, which allows peers using v2 P2P
transport to choose their own one-byte message type
IDs for outgoing messages (see Newsletter #426).
BIP324 currently assigns one-byte IDs through a fixed table, requiring
coordination to add new entries. The proposedset324aliasmessage enables
each peer to announce its own aliases after the other peer advertises support
through BIP434. -
● Core Lightning #9718 fixes a bug where a failed Bitcoin Core
gettxout
RPC call could be misinterpreted as an output being spent or absent. This
could occur when Bitcoin Core was unreachable or still starting up. During
externally funded channel opening (see Newsletter #51), thefundchannel_cancelRPC could forget a channel whose funding
transaction had already been broadcast. Thebcliplugin now retries
temporary connection and startup failures, and reports unsuccessful calls as
errors. Only a successful response indicating no unspent output at the
requested outpoint is considered evidence that an output is unavailable. -
● LDK #5663 fixes a potential loss of forwarded funds when saving channel
recovery state asynchronously. After an incoming channel peer force closes,
an update can record an HTLC preimage in memory but return an
error when attempting to change the closed channel’s commitment state. LDK
also broadcasts a claim transaction for the incoming HTLC. Previously, LDK
began persisting this information to disk, but it did not track the write as
pending due to the error. A separate write recording the channel closure
could finish first, causing LDK to incorrectly consider the preimage as
safely saved and allow the outgoing channel to discard its copy. If the node
crashed before the preimage was saved and if the claim transaction failed to
confirm before expiry, it could lose the incoming payment after paying the
outgoing HTLC. LDK now persists and tracks these updates until their writes
complete. -
● LDK #5678 fixes the fee target used for penalty
transactions when a peer broadcasts a revoked commitment
transaction. Previously, LDK would only select an urgent target if the latest
commitments contained pending HTLCs (see Newsletter
#319), without separately checking whether the onchain
commitment was revoked. Under sustained fee pressure, the penalty could
remain unconfirmed despite fee bumps until the peer’s
timelock expired, enabling the peer to spend the revoked
funds. LDK now uses its urgent onchain sweep target whenever it identifies an
onchain counterparty commitment as revoked. -
● LND #11607 fixes weight estimates for penalty transactions spending HTLC outputs from revoked counterparty
commitments. Previously, LND correctly built the penalty witness but
estimated its size as if it was spending an HTLC from its own commitment
transaction. The penalty actually spent an output from the peer’s commitment,
whose HTLC script could be larger, causing the weight to be underestimated.
When targeting the minimum relay feerate, this could produce insufficient fees and mempool rejection.
LND now matches estimates to the scripts being spent, including the
additional script bytes used by anchor channels. -
● LND #11247 fixes historical chain scans that could miss confirmations or
spends, leaving channels stuck opening or closing. LND shares scans between
requests watching the same transaction or output. Previously, if the first
request began scanning too late, a later request specifying an earlier
starting block height could reuse that scan without checking for earlier
missing blocks. Cached starting heights could preserve this omission across
restarts. LND now scans missing ranges and records their starting heights
alongside cached progress. This complements the cache-key fix in Newsletter
#431. Channels that remain stuck after upgrading may require
restarting LND once with the--height-hint-cache-query-disableoption and
then removing it after recovery. -
● LND #11268 fixes a persistence bug that could cause an unnecessary force
close after a disconnection. This could occur when the local initiator node
sent a fee update on a channel where it had not yet revoked a commitment and
received the peer’s acknowledgment without saving the change to disk. If the
connection then drops before LND receives the peer’s next commitment
signature, it may reconstruct the commitment with the old fee and reject the
valid signature. The fix removes an early return in the database update that
skipped saving the acknowledged local updates. -
● Rust Bitcoin #7160 adds testnet5 (BIP95) support,
including theTestnetVersion::V5value, genesis block, chain identifier,
proof-of-work parameters, and network message magic. It also updates network
parsing and address handling to recognize testnet5. The genesis parameters
were covered in Newsletter #432. -
● BTCPay Server #7846 adds support for connecting to Core Lightning 24.11
or later through its built-inclnrestservice (see Newsletter
#262) using runes, credentials that restrict permitted
commands. This allows a connection to create and monitor invoices without
permission to send payments. Existing direct connections to Core Lightning’s
RPC interface remain supported. The dependency update also changes
certificate handling: theallowinsecure,certthumbprint, and
certfilepathconnection-string options are now ignored. Operators using
external Lightning nodes with self-signed certificates must configure trust
in the environment running BTCPay Server. -
● BTCPay Server #7850 and #7851 fix incorrect
Lightning payout states. The first updates the LNDhub adapter to preserve
payment errors returned in HTTP 200 responses. Previously, these could be
discarded and a failed payout reported as paid. Known errors proving that the
current call sent nothing are now reported as failures; ambiguous outcomes
remain unknown. The second marks a payout complete when a payment lookup
confirms success after the send operation returned an error, preserving the
payment proof.
Want more?
For more discussion about the topics mentioned in this newsletter, join us for
the weekly Bitcoin Optech Recap on Riverside.fm at
17:30 UTC on December 1. The
discussion is also recorded and will be available from our podcasts
page.
