Network & delivery
8 min readUpdatedWhat is BGP hijacking? How route hijacks work and how to stop them
Quick answer
BGP hijacking is when a network announces IP prefixes it does not hold, or a more specific part of them, so that other networks send that traffic to it instead of to the rightful holder. Because BGP trusts announcements by default and routers prefer the most specific prefix, a hijack can blackhole, intercept or impersonate a service within minutes. RPKI origin validation, prefix filtering, accurate routing registry data and outside monitoring reduce the risk, but none removes it completely.
01What is BGP hijacking?
BGP is how networks tell each other which IP prefixes they can deliver traffic to. It was designed on trust: a router generally accepts what its neighbours announce and passes it on. A hijack abuses that trust. A network announces a prefix it does not hold, or a more specific slice of one, and some or all of the internet starts sending that traffic to it.
Two routing rules make hijacks effective. Routers always prefer the most specific matching prefix, so a /24 beats the /16 that contains it everywhere it propagates. Among equally specific routes shorter AS paths tend to win, so an exact-prefix hijack captures the networks topologically closer to the hijacker. Each network appears in those paths by its autonomous system number.
Once the traffic arrives, the hijacker can drop it, taking the victim offline for the affected networks; answer it, impersonating DNS or web servers; or relay it onwards after inspection so that nobody notices.
02What types of BGP hijack are there?
| Type | What is announced | Effect | Caught by RPKI origin validation? |
|---|---|---|---|
| Exact-prefix origin hijack | The victim's prefix, from the attacker's AS | Splits traffic by path length | Yes, if the victim has a ROA |
| Sub-prefix hijack | A more specific part of the victim's prefix | Wins wherever it propagates | Yes, if a ROA exists with a tight maxLength |
| Forged-origin hijack | A route with the victim's ASN appended as origin | Passes origin checks | No |
| Route leak | Legitimate routes passed to networks that should not get them | Traffic detours through an unintended network | Usually not |
| Squatting | Space nobody currently announces | Hard to notice; often used for abuse | Only if a ROA covers it, typically an AS0 ROA |
03How does a hijack unfold?
At a conceptual level, the major incidents follow the same sequence.
- Announcement: a router starts originating a prefix, by mistake, through a careless or compromised customer, or deliberately
- Acceptance: neighbours accept the route because nothing in their filters rejects it, and pass it on
- Propagation: within minutes, networks that prefer the new route redirect traffic for those addresses
- Exploitation or outage: traffic is dropped, answered by impostor servers or relayed onwards
- Withdrawal: the hijacker removes the route, an upstream filters it, or the holder out-competes it
04Route leaks vs hijacks: what is the difference?
RFC 7908 defines a route leak as "the propagation of routing announcement(s) beyond their intended scope". The origin is usually correct; the problem is the path. A customer that passes routes learned from one provider to another, or a network that re-announces its peers' routes to its transit, becomes an unintended detour for traffic it cannot carry.
The best-documented example happened on 24 June 2019. A BGP optimiser at DQE Communications generated more-specific versions of routes it had learned and announced them to its customer Allegheny Technologies, which passed them to its other transit provider, Verizon, and Verizon propagated them. Cloudflare reported losing about 15% of its global traffic at the worst point. Because the leaked routes were more specific than the originals, they won wherever they reached.
For the victim, intent makes no difference: a mistaken leak and a deliberate hijack look the same in a traffic graph, and the defences overlap.
05Famous BGP hijacks and leaks, with dates
Six incidents with primary write-ups show how the technique has moved from accidental blackholes to targeted certificate theft.
| Date | Incident | What happened | Lesson |
|---|---|---|---|
| 24 Feb 2008 | YouTube and Pakistan Telecom | AS17557 announced 208.65.153.0/24 at 18:47 UTC and its upstream propagated it; YouTube answered with the /24, then two /25s; the upstream withdrew the route at 21:01 UTC | A more-specific route wins globally; upstream filtering is the real fix |
| 24 Apr 2018 | Amazon Route 53 and MyEtherWallet | AS10297 announced five /24s of Amazon's DNS space for nearly two hours; impostor DNS sent myetherwallet.com users to a server with a self-signed certificate | DNS infrastructure is a target; certificate warnings matter |
| 24 Jun 2019 | Verizon and DQE route leak | Optimiser-generated more-specifics from DQE leaked by its customer to Verizon | Customer filters and max-prefix limits stop leaks |
| 3 Feb 2022 | KLAYswap | Hijack of addresses serving developers.kakao.com; a fraudulently obtained certificate let the attacker serve malicious JavaScript and take about $2 million | A hijack can defeat domain validation |
| 27 Jun 2024 | Cloudflare 1.1.1.1 | AS267613 announced 1.1.1.1/32 while AS262504 leaked 1.1.1.0/24; about seven and a half hours of disruption in affected networks | Invalid routes still spread through networks without ROV |
| 28–30 Aug 2026 | Softaculous update server | 162.55.80.0/24 announced out of Hetzner's 162.55.0.0/16 with a forged origin; the ROA allowed /16 to /24, so the route was RPKI-valid | A loose maxLength turns a ROA into cover |
06How to detect a hijack of your prefixes
You will not notice a partial hijack from inside your own network, because your routers still see your own announcement. Detection needs an outside view from many vantage points, which route collectors such as the RIPE NCC's Routing Information Service (RIS) provide in real time. BGPalerter, an open-source tool from NTT, reads the public RIS Live feed and alerts on the patterns below for the prefixes you configure.
For a one-off check from a script, RIPEstat's API answers who is announcing a prefix now; when something looks wrong, a traceroute from outside shows where the traffic actually goes.
- A new origin ASN for one of your prefixes
- A new more-specific prefix inside your space, from any origin
- Your prefix appearing with an unexpected neighbour next to your ASN, the fingerprint of a forged origin
- Your announcements becoming RPKI-invalid, or not found after you published ROAs
- A sudden drop in traffic from particular networks or regions while your own routers look normal
# origin ASN(s) currently seen for a prefix
curl -s 'https://stat.ripe.net/data/prefix-overview/data.json?resource=193.0.0.0/21'
# visibility across RIS peers, origins and more-specifics
curl -s 'https://stat.ripe.net/data/routing-status/data.json?resource=193.0.0.0/21'
# RPKI status of that origin and prefix
curl -s 'https://stat.ripe.net/data/rpki-validation/data.json?resource=AS3333&prefix=193.0.0.0/21'07How to defend against BGP hijacking
No single control is enough. The list builds on the MANRS actions for network operators, such as filtering, coordination and global validation, and adds newer measures. Path validation is the missing piece: ASPA, which lets an AS publish its authorised upstream providers so that forged paths can be detected, was still an IETF draft in October 2026.
- Publish ROAs for every prefix you announce, with maxLength equal to the announced length; see what RPKI is
- Publish AS0 ROAs for space you hold but do not route
- Drop RPKI-invalid routes on your own routers
- Filter customer announcements against IRR and RPKI data, generated with a tool such as bgpq4, and set max-prefix limits on every session
- Keep your own IRR route objects accurate, so others can filter correctly
- Enable BGP roles (RFC 9234) where supported, so leaks are detected at the session
- Monitor your prefixes from outside, and keep a runbook with your upstreams' contacts
- Watch certificate transparency logs for certificates issued for your domains that you did not request
08BGP hijacking and DDoS protection
Routing-based DDoS protection uses the same mechanism as a hijack, with permission. The protection provider announces your prefix, or a more specific part of it, so that traffic including the attack reaches its network first. The difference is authorisation: a ROA naming the provider's ASN, published in advance, makes that announcement valid while an attacker's stays invalid.
The overlap matters in two more ways. A hijack of a protected prefix pulls traffic away from the scrubbing network altogether, so monitoring your prefixes is part of protecting them. And from outside, a hijack outage looks like an attack outage, with traffic vanishing for some users, so checking who announces your space is an early step in incident triage, alongside the steps in how to stop a DDoS attack.
Questions
Frequently asked questions
Sources
Sources and verification
RIPEstat queries run with curl 7.88.1 on Debian 12, October 2026.
- 01YouTube hijacking: a RIPE NCC RIS case study · RIPE NCC
- 02BGP leaks and cryptocurrencies · Cloudflare blog
- 03How Verizon and a BGP optimizer knocked large parts of the internet offline · Cloudflare blog
- 04Attackers exploit fundamental flaw in the web's security to steal $2 million in cryptocurrency · Princeton CITP
- 05Cloudflare 1.1.1.1 incident on June 27, 2024 · Cloudflare blog
- 06Latest BGP hijack targets hosting software vendor · APNIC Blog
- 07RFC 7908: Problem Definition and Classification of BGP Route Leaks · RFC Editor
- 08RFC 9234: Route Leak Prevention and Detection Using Roles · RFC Editor
- 09RFC 7454: BGP Operations and Security · RFC Editor
- 10RFC 6811: BGP Prefix Origin Validation · RFC Editor
- 11BGPalerter · NTT on GitHub
- 12Routing Information Service (RIS) · RIPE NCC
- 13MANRS for network operators · MANRS
- 14BGP AS_PATH Verification Based on ASPA Objects (Internet-Draft) · IETF
Last updated