The bitcoin network was at risk of completely collapsing, after a major flaw was spotted with its underlying software.
Developers issued a fix before hackers could exploit the bug, which was only revealed publicly after a solution had been found.
According to the bitcoin developers, anyone mining the cryptocurrency would have been able to carry out the attack on the network, though it would have cost 12.5 bitcoins – roughly $80,000 (£60,000) – to perform successfully.
The attack would have meant exploiting the way bitcoin transactions are confirmed through mining – the process of generating new units of the cryptocurrency by verifying transactions through complex mathematical puzzles.
“A denial-of-service vulnerability (CVE-2018-17144) exploitable by miners has been discovered in Bitcoin Core versions 0.14.0 up to 0.16.2,” an anonymous developer wrote when disclosing the bug on Github.
“It is recommended to upgrade any of the vulnerable versions to 0.16.3 as soon as possible.”
The bug has been around since March 2017, however either nobody noticed it or nobody was willing to incur the expense of exploiting it.
If miners fail to upgrade to the new software, there may still be a risk of the bitcoin network falling victim to an attack, which could result in a significant portion of the network crashing.
Developers have pleaded with bitcoin miners to take the appropriate action in order to protect the network from potential attacks, with the anonymous co-owner of bitcoin.org describing it as a “very scary bug” on Twitter.
“A very scary bug in Bitcoin Core has just been fixed which could have crashed a huge chunk of the Bitcoin network if exploited by any rogue miners,” Cobra Bitcoin tweeted.
Such issues were more common in the early years of bitcoin, which was launched in 2009 following the publication of a whitepaper by its pseudonymous creator Satoshi Nakamoto.