This week's newsletter outlines a vulnerability identified in older versions of Bitcoin Core, highlights the disclosure of a denial-of-service vulnerability in Core Lightning, and discusses the potential refresh of the BIP editor team. Additionally, it features our regular segments that include selected questions and answers from the Bitcoin Stack Exchange, announcements regarding new releases and release candidates, and notable updates to popular Bitcoin infrastructure software.
News
A medium-severity vulnerability in Bitcoin Core has been disclosed. Greg Sanders shared a security advisory on the Bitcoin-Dev mailing list regarding a vulnerability that permitted a peer to temporarily halt a node’s ability to process blocks and transactions. This issue impacts all 29.x releases, 30.x versions prior to 30.5, and 31.x versions before 31.3. The fix is included in version 32.1. Since the 29.x series is no longer supported, users are advised to upgrade to a maintained release. Bitcoin Core manages transactions for which it has not yet received their parent transactions, referred to as orphans. Since version 29.0, when a peer announced the wtxid of a stored orphan, the node verified every parent of that orphan against its mempool and its filters for recently observed transactions. An inv message can encompass up to 50,000 announcements, and duplicates were not excluded. An attacker could exploit this by sending an orphan with thousands of missing parents, followed by inv messages repeating its wtxid 50,000 times. The advisory notes that each such message caused the node to stall for over a dozen seconds, during which it could not process messages from other peers, including blocks. Bitcoin Core issue #35878 has been updated to ensure that each announced transaction is processed only once per inv message. The vulnerability was initially discovered in July by Project Loupe, responsibly disclosed by Sanders, and independently reported by stutxo in August. As it was deemed easily discoverable (refer to Newsletter #429), the advisory was released concurrently with versions 30.5 and 31.3.
A DoS vulnerability in Core Lightning has been disclosed. Nishant Bansal reported on Delving Bitcoin the responsible disclosure of a denial-of-service vulnerability in Core Lightning (CLN), which affects versions 0.12.0 (August 2022) through 26.06.7 (August 2026). This flaw allowed an attacker to continuously crash a victim’s node. While the bug did not grant direct access to funds, persistently crashing a node could jeopardize its channel funds. Users are urged to upgrade to the latest version promptly. The vulnerability was resolved in CLN version 26.06.8 (see Newsletter #424). This issue was related to multiple v1 channels sharing the same channel_id. A malicious peer could open a channel using another channel’s funding outpoint. Given that the channel_id is derived from that outpoint, two channels could thus end up with matching IDs. CLN operates a channeld subdaemon for each channel, while connectd directs messages to the appropriate subdaemon based on their channel_id. The assumption of channel_id uniqueness in CLN led to crashes when collisions occurred. There were two methods by which a malicious peer could crash the node: the first during reconnection, which was identified using smite, a snapshot fuzzing framework for Lightning Network implementations, and the second upon channel closure, discovered by developer Eugene Siegel. When a peer reconnects, the main daemon, lightningd, initiates the channeld subdaemons and hands them over to connectd. The first channel_id lookup would function normally. However, the second request would trigger an assertion to confirm that the connection was not already active, leading to an abort of connectd and crashing the node. Since both channels remained in the database after a restart, a new reconnection attempt would result in another crash. CLN retains previously closed channels in memory using a hash table keyed by channel_id. An attacker could close a channel with the same channel_id as one already closed, leading to the failure of an assertion that checks for duplicates in the map. Unlike the first scenario, the node would crash on every restart without further action from the attacker until it was upgraded. This attack vector specifically affected versions 25.05 and higher.
Discussion on refreshing BIP editors has been initiated. Mark “Murch” Erhardt brought up his proposal from April on the Bitcoin-Dev mailing list to refresh the BIP editor team (see Newsletters #299 and #418 for prior discussions on the editor set), noting a backlog of submissions pending editor review in the BIPs repository. He presented two options: adding active editors or lowering standards so that editors only check the formatting of new submissions. He strongly favored refreshing the team to include three editors who contribute regularly. He also mentioned that volunteers hesitant about an indefinite commitment could serve for a limited term, such as 12 to 24 months. Following his post, several individuals volunteered, and current editor Olaoluwa Osuntokun indicated plans to resign at the end of the year. Discussions were still ongoing at the time of writing.
Selected Q&A from Bitcoin Stack Exchange
Bitcoin Stack Exchange serves as a primary resource for contributors seeking answers to their inquiries or when they have spare moments to assist curious or confused users. This monthly feature highlights some of the most highly voted questions and answers shared since our last update.
- Why does a policy that is valid with rust-miniscript throw a compile error on the sipa site? Pieter Wuille clarifies that his miniscript policy compiler site accepts symbolic names exclusively for keys, not hash preimages, and does not permit malleable scripts (see Newsletter #230). One aspect of the asker’s policy could be satisfied by simply revealing a preimage after 144 blocks, which is inherently malleable as it involves no signatures.
- How can I repair corrupted undo data (rev*.dat checksum mismatch) without a full reindex? P22 explains the process of rebuilding damaged undo records on a node using -txindex. A block's undo data consists of the list of outputs that its inputs have spent, thus allowing each record to be reconstructed byte for byte and restored in place. The -reindex-chainstate option does not help because Bitcoin Core only writes undo data for blocks without an existing undo position.
- Why does no Bitcoin opcode push data about the spending transaction onto the stack? LearnBitcoin responds that a soft fork redefining an OP_NOP opcode can only result in script failures, as leaving a value on the stack would cause discrepancies in validity between old and new nodes. This is why the proposed OP_CHECKTEMPLATEVERIFY only performs verification. Tapscript introduced OP_SUCCESSx opcodes that may also write to the stack (see Newsletter #416), and the covenant proposals OP_TXHASH and OP_TEMPLATEHASH are defined on them.
Releases and release candidates
New releases and release candidates for popular Bitcoin infrastructure projects are available. Users are encouraged to upgrade to the latest releases or assist in testing the release candidates.
- Bitcoin Core versions 31.3 and 30.5 are maintenance releases of the leading full node implementation. Both versions address the DoS vulnerability mentioned earlier.
Notable code and documentation changes
Recent significant 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 encryptwallet RPC, which was used to encrypt an existing unencrypted wallet. This RPC now requires Bitcoin Core to be started with the -deprecatedrpc=encryptwallet flag and is scheduled for removal in a future major release. Encrypting an existing wallet does not guarantee the removal of unencrypted private-key material from disk. It can also generate a new seed, potentially preventing earlier backups from recovering funds sent to newly generated addresses. Users wishing to encrypt their wallet are advised to create an encrypted wallet by providing the passphrase argument to createwallet (see Newsletter #47). Existing encrypted wallets remain supported.
- BIPs #2301 introduces draft BIP333, which allows peers utilizing v2 P2P transport to select their own one-byte message type IDs for outgoing messages (see Newsletter #426). Currently, BIP324 assigns one-byte IDs using a fixed table, necessitating coordination to add new entries. The proposed set324alias message enables each peer to announce their own aliases after the other peer indicates support via BIP434.
- Core Lightning #9718 rectifies a bug where a failed Bitcoin Core gettxout RPC call could be misinterpreted as an output being spent or absent. This issue could arise when Bitcoin Core was either unreachable or still initializing. During externally funded channel openings (see Newsletter #51), the fundchannel_cancel RPC could forget a channel whose funding transaction had already been broadcast. The bcli plugin now retries temporary connection and startup failures, reporting 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 addresses a potential loss of forwarded funds when asynchronously saving channel recovery state. After an incoming channel peer force closes, an update can record an HTLC preimage in memory but return an error when attempting to modify the commitment state of the closed channel. LDK also broadcasts a claim transaction for the incoming HTLC. Previously, LDK began persisting this information to disk but did not track the write as pending due to the error. A separate write for the channel closure could complete first, leading LDK to incorrectly assume that the preimage was safely saved and permit the outgoing channel to discard its copy. If the node crashed prior to the preimage being saved and if the claim transaction failed to confirm before expiry, it could result in the loss of the incoming payment after settling the outgoing HTLC. LDK now persists and monitors these updates until their writes are finalized.
- LDK #5678 corrects the fee target utilized for penalty transactions when a peer broadcasts a revoked commitment transaction. Previously, LDK would only select an urgent target if the latest commitments included pending HTLCs (see Newsletter #319), without separately checking if the onchain commitment had been revoked. Under sustained fee pressure, the penalty could go unconfirmed despite fee bumps until the peer’s timelock expired, enabling the peer to spend the revoked funds. LDK now applies its urgent onchain sweep target whenever it identifies a revoked onchain counterparty commitment.
- LND #11607 resolves weight estimates for penalty transactions that spend HTLC outputs from revoked counterparty commitments. Previously, LND correctly constructed the penalty witness but estimated its size as if it were spending an HTLC from its own commitment transaction. The penalty actually spent an output from the peer’s commitment, which could be larger, leading to an underestimation of weight. When targeting the minimum relay feerate, this could result in insufficient fees and rejection from the mempool. LND has now aligned estimates with the scripts being spent, incorporating the additional script bytes associated with anchor channels.
- LND #11247 remedies historical chain scans that could overlook confirmations or spends, leaving channels stalled during opening or closing. LND shares scans between requests monitoring the same transaction or output. Previously, if the first request began scanning too late, a subsequent request specifying an earlier starting block height could reuse that scan without verifying earlier missing blocks. Cached starting heights could maintain this omission across restarts. LND now scans for missing ranges and logs their starting heights alongside cached progress. This complements the cache-key fix in Newsletter #431. Channels that remain stuck after the upgrade may need a one-time restart of LND with the --height-hint-cache-query-disable option, which can be removed after recovery.
- LND #11268 addresses a persistence bug that could lead to an unnecessary force close following a disconnection. This issue could occur when the local initiator node sent a fee update for a channel where it had yet to revoke a commitment and received the peer’s acknowledgment without saving the change to disk. If the connection drops before LND receives the peer’s next commitment signature, it may reconstruct the commitment with the outdated fee and reject the valid signature. The fix eliminates an early return in the database update that previously skipped recording the acknowledged local updates.
- Rust Bitcoin #7160 introduces testnet5 (BIP95) support, which includes the TestnetVersion::V5 value, 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 versions 24.11 or later through its built-in clnrest service (see Newsletter #262) utilizing runes, which are credentials that restrict allowed commands. This enables a connection to create and monitor invoices without the capability to send payments. Existing direct connections to Core Lightning’s RPC interface remain supported. The dependency update also modifies certificate handling: the allowinsecure, certthumbprint, and certfilepath connection-string options are now disregarded. Operators using external Lightning nodes with self-signed certificates must establish trust in the environment where BTCPay Server is running.
- BTCPay Server #7850 and #7851 correct incorrect Lightning payout states. The first update to the LNDhub adapter ensures that payment errors returned in HTTP 200 responses are preserved. Previously, these could be discarded, resulting in a failed payout reported as completed. Known errors indicating that the current call sent nothing are now classified as failures, while ambiguous outcomes remain unknown. The second update marks a payout as complete when a payment lookup confirms success after the send operation returned an error, safeguarding the payment proof.