A previously undisclosed bug in Bitcoin Core could have let attackers steal funds, delay transfers or split the network had it not been patched in 2018.