Free tech learning for everyone, from basics to pro

BlockchainEmerging Technologies and SecurityIntermediate

Blockchain security: attacks and weaknesses

In short: The cryptography behind major blockchains is strong, so attackers usually aim elsewhere: at consensus on smaller chains, the peer-to-peer network, smart contract code, cross-chain bridges, exchanges and above all the people holding private keys. Good security covers every layer, not just the chain.

Strong maths, weak edges

It is tempting to think a blockchain is "unhackable". The hashing and signature algorithms used by major chains are well studied and, with today's computers, not practical to break directly. Yet large losses still happen. The reason is that a blockchain system is much more than its cryptography: it includes networking, consensus incentives, application code, third-party services and people. This note walks through each layer and how it is defended.

Blockchain attack layersUsersphishing, key theft, scamsApplicationswallets, exchanges, bridgesSmart contractslogic and code bugsConsensus51%, selfish miningNetworkeclipse, Sybil, DDoS
Figure 1. Attacks can target any layer, and in practice the upper layers are hit far more often than the protocol itself.

Network and consensus attacks

  • Sybil attack: one attacker runs many fake nodes to gain influence. PoW and PoS resist this because influence depends on work or stake, not node count.
  • Eclipse attack: the attacker surrounds a victim node with their own peers, so the victim only sees what the attacker shows. Defences include many diverse outbound connections and careful peer selection.
  • 51% (majority) attack: an attacker with most of the mining power or stake can reorder or replace recent blocks. They cannot steal other people's coins or forge signatures, but they can reverse their own payments (a double spend) and censor transactions.
  • Selfish mining: a miner withholds found blocks to gain an unfair share of rewards.
51% attack (concept)Pay merchanttx on publicchainMine insecretchain withouttxOutpacehonestmajority powerRelease chainlonger onewinsPaymentundonedouble spend
Figure 2. With majority power an attacker can replace recent blocks and reverse their own payment.

Majority attacks are most realistic on smaller chains where renting enough computing power or buying enough stake is affordable. That is why exchanges usually require more confirmations for smaller networks. See consensus for how finality works.

Application-layer attacks

TargetTypical weaknessDefence
Smart contractsReentrancy, missing access checks, logic errorsSecure patterns, testing, audits, bug bounties
Cross-chain bridgesSmall set of keys or validators guards large funds; verification bugsStrong multisig, independent validators, limits and monitoring
OraclesManipulated price or event dataSeveral data sources, time-averaged values
Exchanges and custodiansHot wallet compromise, insider abuseCold storage, multisig or MPC, segregation of duties
Front-ends and walletsCompromised websites or supply chain tamperingCode signing, dependency review, transaction previews

Bridges deserve special attention. They lock assets on one chain and issue matching tokens on another, so they hold large pools of value behind a handful of keys or a complex verification contract. Several of the largest publicly reported blockchain thefts involved bridges.

The human layer

Most individual losses come from the oldest tricks: phishing sites that copy a wallet or exchange, fake support staff who ask for a recovery phrase, malicious browser extensions, malware that swaps a copied wallet address, and investment scams. Once a transaction is confirmed it usually cannot be reversed, so prevention matters far more than recovery. See wallets and keys for protecting private keys and phishing basics for spotting lures.

Tip: no legitimate support team, exchange or wallet provider will ever ask for your recovery phrase. Anyone who asks is attempting theft.

Detecting and responding

  1. Monitor contracts and wallets you are responsible for, with alerts on unusual transfers or admin calls.
  2. Use pause functions and withdrawal limits so an attack can be slowed while you investigate.
  3. Keep an incident response plan that covers key rotation, public communication and contact with law enforcement.
  4. Because blockchains are public, analysts can often trace where stolen funds move, which supports investigations.

In exams, separate attacks on the protocol (51%, eclipse, Sybil) from attacks on applications and users (contract bugs, bridges, phishing), and remember that a majority attacker can reverse their own transactions but cannot forge other users' signatures. Any hands-on study should use local test chains or public test networks, never live systems you do not own.

Practice

What can a 51% attacker do, and what can they not do?
They can reorder or replace recent blocks, reverse their own payments and censor transactions; they cannot forge signatures or spend coins from other people's addresses.
What is an eclipse attack?
An attacker controls all of a victim node's peer connections, isolating it so it sees a false view of the network.
Why are cross-chain bridges attractive targets?
They hold large amounts of locked value guarded by a small set of keys or complex verification code, so one flaw can expose a lot.

Key takeaways

  • Strong cryptography does not make the whole system secure.
  • Protocol attacks: Sybil, eclipse, 51% double spends and selfish mining.
  • Application attacks: contract bugs, bridges, oracles, exchanges and front-ends.
  • Most personal losses come from phishing, scams and stolen recovery phrases.
  • Monitor, limit and plan responses, because confirmed transactions rarely reverse.
Tracks your learning on this device only. See your progress on the learning paths.

About the author

Mohamed Fayas

Founder of FM TecHub. CCNA certified, with a BTEC HND in Network Engineering, and BEng (Hons) in Computer Networking and Cloud Security. He writes practical, plain-English guides on networking, security and cloud.

More about the author

Original content written by Mohamed Fayas for FM TecHub. © 2026 FM TecHub. You're welcome to share a link to this page; please don't copy the text elsewhere without permission.

Stay up to date by email

New notes, tools and security news from FM TecHub, explained simply. Free.

We only use your email to send these updates. See our privacy policy.