← Socratic Seminar #52 ← → or space to navigate

Bitcoin Core · CVE-2026-117348 · Medium · disclosed 2026-11-20

One inv message, one stalled node

A peer could freeze a node's message processing for over a dozen seconds per message by announcing the same orphan transaction 50,000 times. Blocks included.

Found by an LLM scan in Elias Rohrer's Project Loupe at Spiral · validated by Gregory Sanders · independently reported by Stutxo · advisory · fix #35878

Background

Orphans, and who to ask for their parents

  • An orphan is a transaction whose parents the node hasn't seen. Core parks it in the orphanage and asks peers for the missing parents.
  • Since 29.0, any peer that announces an orphan's wtxid can become an "orphan resolution candidate" that the node asks for the parents.
  • To decide, on every such announcement the node rebuilds the orphan's parent list and checks each parent:
// src/node/txdownloadman_impl.cpp · AddTxAnnouncement()  (pre-fix)
if (auto orphan_tx{m_orphanage->GetTx(*wtxid)}) {
    auto unique_parents{GetUniqueParents(*orphan_tx)};      // copy + sort every input's txid
    std::erase_if(unique_parents, [&](const auto& txid) {
        return AlreadyHaveTx(txid, /*include_reconsiderable=*/false);  // orphanage, filters, mempool
    });
    ...

Cheap for one announcement. Not cheap when the same one arrives 50,000 times in a row.

The attack

Thousands of parents × 50,000 duplicates

Step 1: the attacker sends an orphan with thousands of missing parents. Step 2: one inv message lists that orphan's wtxid 50,000 times. Each copy repeats the parent-list sort and a lookup per parent, multiplying into on the order of a hundred million checks. ① send an orphan tx X with thousands of inputs parents unknown → orphanage ② one inv message wtx X wtx X ⋮ × 50,000 (MAX_INV_SZ) for each of 50,000 entries: rebuild + sort X's parent list check every parent: orphanage · recent rejects recent confirmed · mempool ≈ 50,000 × 2,400 ~10⁸ checks > 12 s stall per message

The advisory says "thousands" of parents and "over a dozen seconds." The 2,400 figure is our estimate of the most inputs a standard-weight (400,000 WU) transaction can hold. Each message is only ~1.8 MB, well under the 4 MB limit.

The impact

Everyone waits behind one peer

Timeline of the message-handler thread: the attacker's inv message occupies it for more than 12 seconds while holding cs_main; messages from honest peers, including a new block, queue up and are only processed afterwards. MESSAGE-HANDLER THREAD msg attacker's inv: 50,000 × the same orphan wtxid loop runs holding cs_main + m_tx_download_mutex > 12 seconds block msgs WAITING MEANWHILE new block from peer 3 txs from peer 7 pings, headers… …then the next attack message
  • Core processes peers' messages on a single thread, and this loop also holds cs_main, the main validation lock.
  • Not a crash, and no coins at risk: the stall ends. But blocks wait behind it too, and each new message restarts the stall.

The fix · #35878 by instagibbs (Gregory Sanders)

Process each announced transaction once per message

// src/net_processing.cpp · ProcessMessage(), INV handler
+   std::unordered_set<uint256, SaltedUint256Hasher> seen_txids{0, m_txhash_hasher};
+   std::unordered_set<uint256, SaltedUint256Hasher> seen_wtxids{0, m_txhash_hasher};
    LOCK2(cs_main, m_tx_download_mutex);
    for (CInv& inv : vInv) {
        ...
+       auto& seen_hashes{inv.IsMsgWtx() ? seen_wtxids : seen_txids};
+       if (!seen_hashes.insert(inv.hash).second) continue;
        const GenTxid gtxid = ToGenTxid(inv);

Before

50,000 entries → 50,000 parent-list rebuilds.

After

Duplicates are skipped: 1 rebuild per message. The set is scoped to one inv message.

A quiet fix

The public PR said: "Should be no change in observable behavior." Merged 2026-08-06, months before disclosure.

Versions and timeline

Fixed in 30.5, 31.3 and 32.1. 29.x stays broken.

Timeline: July 8 Project Loupe reports; August 4 Stutxo reports and the fix PR opens; August 6 merged; October 22 disclosure policy updated; October 27 version 32.1 released; November 20 versions 30.5 and 31.3 released and the bug disclosed. Jul 8 Loupe reports Aug 4 Stutxo reports; PR #35878 opens Aug 6 merged to master Oct 22 new policy for easy-to-find bugs Oct 27 32.1 released Nov 20 30.5 + 31.3, disclosure

Affected

29.0–29.5, 30.0–30.4, 31.0–31.2

Fixed

30.5, 31.3, 32.1 (backports #36893 and #36892, merged Nov 17)

No fix

29.x is end of life. Upgrade to a maintained series.

Why it shipped this way

LLMs changed the disclosure math

"Easily discoverable" policy

Adopted 2026-10-22 (bitcoincore.org #1281, by darosior). For bugs that "can be discovered with minimal effort, such as through a simple LLM prompt," Core ships point releases for every maintained series as soon as possible, skipping the usual severity-based embargo.

Why

Reports of easy-to-(re)discover bugs increased, "largely due to LLMs drastically reducing the bar to find certain classes of issues or identify covert fixes." A long embargo protects little when anyone can find the bug, or spot the quiet fix.

Project Loupe

Elias Rohrer's harness at Spiral: LLM agents scan a repo, each finding is self-validated with a regression-test PoC, and confirmed findings go to triage. Also credited for #36757 this month.

This bug was found twice in four weeks: by Loupe on Jul 8 and by Stutxo on Aug 4.

Discussion

Questions for the room

  • The fix merged publicly in August with a benign description. With LLMs "identifying covert fixes", do quiet fixes still buy any time?
  • Dedup is per message. What bounds the cost of many different orphans announced at once? Is per-peer CPU accounting the real fix?
  • Two reporters, one of them a bot, found the same bug within four weeks. What does Core's review process look like when LLM reports outnumber reviewers?
  • 29.x got no fix. Should end-of-life still mean end-of-life when a bug is this easy to find?