Edition of Sat 28 Nov 2026 UTC Free to read. No paywall. RSS · X
Infrastructure Intel

Crypto and AI agent infrastructure, read by a network architect. No hype. No shilling.

Incident Forensics

Chainflip Named the Library. Its Public Code Names the Version

By · · 7 min read

Part 2 of Chainflip's incident report says the way in was a use-after-free flaw in ZeroMQ, fixed in version 4.3.3 and later. It doesn't say which version the validators were running. Chainflip's public repository does. The mainnet branch pinned libzmq 4.3.2, released in July 2019, and nine days before the theft the team patched a different bug in the same copy.

4.3.2the libzmq version pinned in Chainflip's public mainnet branch. It was released on July 8, 2019.

When I wrote up Part 1 of Chainflip’s incident report, the first question I left for Part 2 was which library. Part 2 came out on Friday, November 27, and answers it. The entry point was ZeroMQ, the open-source messaging library also known as libzmq, which the validator software uses to talk to other validators.

Chainflip adds that the flaw “is corrected in libzmq 4.3.3 and later” and that every active validator now runs a build on 4.3.4. It doesn’t say what they ran on November 21. So I went and looked.

What Part 2 says

The account is short. The attacker registered a validator account, which gave it the right to connect to other validators. Chainflip’s investigation “indicates” that it then used a use-after-free flaw in libzmq to run code inside validator processes, and copied vault key shares from enough validators to sign transactions without the network.

A use-after-free is a memory error. A program releases a block of memory and goes on using a pointer into it. If an attacker can control what lands in that block next, a malformed message from a peer can become code running inside the process. Here the process held key shares.

Chainflip also rules three things out as causes: the vault smart contracts, the threshold signature scheme and the State Chain’s logic.

Part 2 also says, “Safe mode activation could not have prevented any losses from this attack.” That follows from how the theft worked. The signatures were valid and the network never asked for them. Pausing swaps and deposits doesn’t reach someone signing on their own machine with copied shares. Part 2 doesn’t mention withdrawal limits on the vaults, which I raised after Part 1.

What it holds back

Chainflip is plain about the limits. It’s “confident in the main vectors used” and has “not yet confirmed the entire exploit chain with full confidence.” The detailed technical report is being held until the network is hardened. No outside forensic report has been published, so this is still the project’s own account.

It names no CVE, and no version.

What the public repository shows

Chainflip’s validator code is public on GitHub. I read the dependency files and the recent pull requests on Saturday, November 28. This section is my reading of that record. Chainflip hasn’t confirmed it.

The mainnet branch pinned libzmq 4.3.2. The lockfile on the branch named release/2.3 lists the bundled ZeroMQ source as version 0.1.10+4.3.2. A Chainflip pull request from November 12 describes that branch as the one “mainnet runs.” The ZeroMQ release notes date 4.3.2 to July 8, 2019.

The team patched that old copy nine days before the theft. The same pull request says mainnet engines were crashing on an assertion in libzmq 4.3.2, in the file stream_engine.cpp, when a heartbeat was sent on a connection whose peer had hung up. Chainflip fixed it by copying the 4.3.2 source into its own fork and applying a patch there. The pull request closes a ticket numbered SEC-81. Its notes say that particular crash is still unfixed upstream through 4.3.5. After the patch, libzmq was still 4.3.2.

The public code stops on November 20. The last commits on both the main branch and the mainnet branch are from the day before the theft. The patched release Chainflip sent to operators on November 21 isn’t in the public repository, so I can’t see the fix.

A lockfile shows what the source builds against. I can’t see what binary each operator was running on the morning of November 21. The lockfile is the only public evidence of the version, and it says 4.3.2.

A candidate for the flaw

The ZeroMQ release notes for 4.3.3 list five security advisories. None of them is a use-after-free. One is a heap overflow in which the sender decides what gets written. The notes say it applies when CURVE encryption is disabled.

Further down, in the ordinary bug fixes, is this line: “Fixed #3594 - fixed stream_engine use after free due to concurrent heartbeats.” It’s the only use-after-free named in the 4.3.3 notes. The fix was merged upstream on July 24, 2019, sixteen days after 4.3.2 was released, and shipped in 4.3.3 on September 7, 2020. As far as I can find, it never got a CVE.

That fits Chainflip’s description: a use-after-free, corrected in 4.3.3 and later. It’s a match on description only. Chainflip hasn’t said this is the bug, and there may be others fixed in that release that the notes don’t label.

Two facts about that fix are worth recording, whether or not it turns out to be the one.

It has no identifier. Tools that check dependencies against vulnerability databases flag known advisories. A fix that appears only as a changelog line isn’t in those databases. A build on 4.3.3 or later would have included it.

It’s in the file Chainflip patched. The crash fixed on November 12 and the 2019 use-after-free are different bugs. Both are in the heartbeat handling in stream_engine.cpp.

A question about the crashes

Part 2 says the attacker exposed IP addresses “in the weeks leading up to the actual exploit.” The pull request says mainnet engines were aborting in libzmq’s heartbeat code by November 12 at the latest.

I don’t know whether those two facts are connected. The pull request cites upstream reports of the same assertion from other users, so the crash has causes that don’t involve an attacker. Chainflip hasn’t said whether it has looked.

The response

  • Every validator that was online is being replaced. Operators are standing up fresh machines with new credentials and abandoning the old ones. Chainflip’s stated reason is to erase any exposure to key leakage from the attack.
  • libzmq is now 4.3.4. That release is from January 2021. The current stable release is 4.3.5, from October 2023. Part 2 doesn’t say why it stopped one short.
  • Validators are being whitelisted. A proposal limits validator operators “to just the known, existing set.” Chainflip says this leaves the network “still decentralised” with “a permissioned layer.” Under the old design, per Part 1, any account that posted the minimum stake could register and connect to the validators. Under the proposal, an operator outside the existing set can’t join.
  • The protocol stays paused. There’s no restart date.

The money

Part 2 doesn’t change the loss: 133.34425053 BTC and the contents of the Ethereum vault, about $12.6 million at the time.

  • The accounting is done. Chainflip says it has a final method for each affected account. Open loans will be settled at prices from the time of the attack.
  • A recovery fund is planned. Part 2 gives no size, no source of money and no date.
  • The bitcoin hasn’t moved, per Chainflip. The Ethereum assets are, in its words, likely still in Tornado Cash.
  • The 10% bounty offer stands. Nothing has been returned. The thief appears to prefer 100%.
  • Liquidity providers say they’d come back, on condition of a high-standard security review and a recapitalisation plan.
  • The swap site is returning before the protocol does. swap.chainflip.io will route through SwapKit to other networks. The protocol itself stays paused.

What’s still open

  • The version. Chainflip hasn’t said what validators ran on November 21. Its public lockfile says 4.3.2.
  • The identifier. Chainflip names no CVE and no upstream issue number. Other projects running an old libzmq have nothing to check their own exposure against.
  • How many validators were reached. Both reports stop at “enough.”
  • How key shares are stored. Part 2 says hardening is planned and gives no detail.
  • Who pays. The recovery fund has no stated size, source or date. So far it’s a fund in the sense that it has a name.

For anyone who runs validators

Threshold signing spreads a key across many machines. That only helps if the machines fail separately. One library in the peer-facing path of every validator is one failure, and at Chainflip it was reachable by anyone who posted the stake.

Three checks follow from the public record.

  • Read your lockfile for the libraries that face peers. Write down the versions and the dates they were released.
  • Don’t rely on a CVE scan alone. Compare against the upstream changelog. The 2019 fix above shipped without an advisory.
  • Treat a hand patch to an old dependency as a warning. If you’re carrying your own fix to a seven-year-old copy, the next question is what else was fixed upstream since.

Chainflip says a detailed technical report will follow. I’ll update this piece when it does.

David Cooper, CCIE #14019

Not financial or legal advice. Views are my own.

Sources