Unused autonomous system numbers are being weaponized. Recent hijack reports tracked by Spamhaus describe actors that originate announcements for unallocated prefixes and forge the AS_PATH to point at networks they do not control, so traffic is steered somewhere unexpected while the attacker stays hidden. Stripping enough path information even lets an attacker pose as the origin of a BGP prefix. The countermeasure is narrow: verify that the first AS in an advertised path is the AS of the peer that sent it.
What the forged paths look like
Implausible AS relationships are the tell. Take a hijack Spamhaus reported against a prefix belonging to Orange S.A.: using the monocle tool, the related BGP UPDATE message is easy to locate in MRT data.
➜ ~ monocle search --start-ts 2026-04-13T00:20:00Z --end-ts 2026-04-13T00:23:59Z --prefix 90.98.0.0/15 --collector rrc26 --json
{
"aggr_asn": null,
"aggr_ip": null,
"as_path": "48237 1299 199524 270118 17072 41128",
"atomic": false,
"collector": "rrc26",
"communities": null,
"local_pref": 0,
"med": 0,
"next_hop": "185.1.8.3",
"origin": "IGP",
"peer_asn": 48237,
"peer_ip": "185.1.8.3",
"prefix": "90.98.0.0/15",
"timestamp": 1776039612.0,
"type": "ANNOUNCE"
}
AS1299 (Arelion) is a Tier 1 network, so every AS to its right in that path implies a customer-to-provider relationship — AS17072 would be a transit provider for AS41128, AS270118 for AS17072, and AS199524 for AS270118. The parties involved make that implausible: AS41128 is an unused Orange France ASN, AS17072 is a Mexican ISP, AS270118 is a Mexican hosting provider, and AS199524 is Gcore, which has a global peering presence. An unused Orange France ASN buying transit from Mexican ISPs and upstreaming to Gcore and Tier 1s does not reflect real topology.
A second reported hijack, covering 47.1.0.0/16 and 47.2.0.0/16 from origin AS36429, carried Cloudflare's own ASN 13335 in the path: "199524 270118 17072 13335 36429". The UPDATE messages are visible in Cloudflare Radar's MRT Explorer.

Cloudflare (AS13335) has no adjacency with AS36429, an unused Charter ASN, so that path is forged, with Cloudflare's ASN inserted as a fake upstream toward Gcore. Spamhaus also noted that all the hijacked routes led to a network behind Gcore peering in Chicago; the Mexican ISPs and Cloudflare were never in the forwarding path. The path can therefore be treated as fabricated up to the leftmost common AS — here AS199524 — since the remainder is implausible. The pattern is: originate parked prefixes, forge the whole AS_PATH without ever including the hijacker's own ASN, then advertise to Gcore.
Gcore appears to skip verification that the First AS matches its customer's ASN, so the forged path is accepted and propagated to upstreams and peers. ASPA will invalidate such paths, but an attacker can sidestep it by including only an RPKI-ROV-valid origin AS or a legitimate ASPA upstream AS. First AS checking and enforcement, already part of BGP, is what closes this gap.
Two manipulation patterns
The AS_PATH drives path selection and loop prevention, and operators use it in routing policy to steer around or through specific ASes. BGP's trust model leaves it open to manipulation — both legitimately, as with AS prepending, and maliciously, by shortening the path to attract traffic or by forging an origin. Two examples show why First AS checking matters.
Forged origin with everything else done right
- AS64506 signs its routes with an RPKI ROA and creates an ASPA object naming only AS64503 as a valid provider.
- AS64505 strips itself from the path and originates with AS64506.
- AS64502 does not enforce the First AS.

The result passes RPKI-ROV and is the shortest path, so it wins traffic. Neither ASPA validation at AS64501 (the customer) nor at AS64502 (its provider) finds an invalid path, since there is no valley in "64502 64506". By omitting its own ASN, AS64505 simply impersonates AS64506. Enforcing First AS makes AS64502 drop the route.
Path shortening to win billing
- AS64506 has two transit providers, AS64503 and AS64505, and AS64505 bills on traffic usage ratios.
- AS64505 strips itself from the path, and its peer AS64504 does not enforce the First AS.

Path selection now prefers the route via AS64504. AS64505 carries and bills for all traffic toward AS64506, while AS64503 gets nothing.
The rule and its RFC basis
Both cases reduce to one check: the First AS in a received AS_PATH must equal the peer AS configured on the BGP neighbor. A mismatch means the path was manipulated. RFC 4271, Section 6.3 spells the procedure out:
"If the UPDATE message is received from an external peer, the local system MAY check whether the leftmost (with respect to the position of octets in the protocol message) AS in the AS_PATH attribute is equal to the autonomous system number of the peer that sent the message. If the check determines this is not the case, the Error Subcode MUST be set to Malformed AS_PATH."
RFC 7606 later revised vendor error handling, recommending that routes with malformed AS_PATHs be dropped using treat-as-withdraw, so specific prefixes are discarded without tearing down the whole BGP session. The current ASPA draft also states that ASPA cannot handle paths lacking sufficient AS_PATH information because of malformed announcements — making First AS enforcement a must for routing security.
Testing the rule by deliberately breaking it
Rather than relying on theory and past incidents, the measurement was designed to see how widely forged First AS values are actually accepted. The setup announced a pair of test prefixes — one IPv4, one IPv6 — to Tier 1 EBGP neighbors.
- Two IP prefixes were allocated, one for IPv4 and one for IPv6.
- Advertisements to Tier 1 neighbors were deliberately prepended with a Cloudflare-owned ASN other than 13335, namely AS402542, ahead of 13335.
In practice, the prefixes went to AS1299 from Cloudflare's normal BGP session in Geneva. The local AS is AS13335, but the AS_PATH begins with AS402542.
[email protected]> show configuration policy-options policy-statement 4-TELIA-ACCEPT-EXPORT term ADV-FIRST-AS-PROBE-CR-1695522
from {
community ANYCAST-ROUTE;
prefix-list fl_first_as_prober;
route-type internal;
}
then {
origin igp;
as-path-prepend 402542;
next-hop self;
accept;
}
[email protected]> show route advertising-protocol bgp <redacted_1299_ip> 162.159.82.0/24 detail | grep "AS path: "
AS path: 402542 [13335] I
The expected outcomes split cleanly:
- Networks that enforce First AS silently drop the route using the RFC 7606 withdrawal method.
- Networks that do not enforce it accept the route and install it for forwarding toward the test prefixes.
Either behavior would show up in public BGP route views.
The original idea was a continuous stream of First AS violations toward all peers, paired with a tool letting anyone check which ISPs validate First AS and which do not. That plan was abandoned: some networks still have not implemented the RFC 7606 guidance for malformed AS_PATHs and reset BGP sessions instead of applying a treat-as-withdraw behavior. Announcements that violate First AS could therefore not be run continuously without affecting real Cloudflare traffic.
Tier 1 networks were the next best target. They form the Internet's backbone and hold the largest AS customer cones of any network, so hijacks or malformed paths sourced from these peers carry the widest impact.
Normal vs. malformed propagation on the Tier 1s
As a baseline, the anycast prefix 1.1.1.0/24 propagates as expected: every Tier 1 network with a direct adjacency to Cloudflare reaches it directly.

The deliberately malformed announcement of 162.159.82.0/24 propagates very differently, with far fewer Tier 1s accepting it directly from Cloudflare (AS13335 with AS402542 prepended).

AS5511 (Orange S.A.) is not shown above because of its limited presence in public route views, but it took part in the testing.
Applying the criteria above, the split among Tier 1 networks is:
- Enforcing First AS and dropping the invalid announcements: AS174 (Cogent), AS1299 (Arelion), AS3257 (GTT), AS3491 (PCCW), AS5511 (Orange S.A.), AS6453 (Tata), AS7018 (AT&T).
- Not enforcing First AS and accepting and installing the prefixes: AS701 (Verizon), AS2914 (NTT), AS3356 (Lumen/Colt/Cirion), AS6461 (Zayo), AS6762 (Sparkle), AS6830 (Liberty Global), AS12956 (Telefonica).
Half of the Tier 1 networks proved vulnerable to hijacks that violate the First AS rule. Only Tier 1s were measured here, but non-Tier 1 networks that break the rule are certain to exist as well.
Most of the failing Tier 1 networks were identified by peer MAC addresses as running Juniper Networks routers, which points to a broader issue: vendor defaults determine how secure a network is, out of the box, against First AS violation attacks.
Vendor defaults and the IX route server exception
"Yes" in the chart means the BGP implementation enforces First AS by default; "No" means it is vulnerable by default.
BGP implementation | First AS enforced by default | Documentation |
|---|---|---|
Cisco IOS/XE/XR | Yes | bgp enforce-first-as |
Junos OS / Junos OS Evolved | No | enforce-first-as |
Arista EOS | Yes | bgp enforce-first-as |
Nokia SR OS | No | enforce-first-as |
Huawei | Yes | check-first-as |
Extreme SLX-OS | No | enforce-first-as |
RouterOS | No | Configuration not available |
BIRD | No | enforce first as |
OpenBGPD | Yes | enforce neighbor-as |
FRR | Yes (since October 2023 patch) | bgp enforce-first-as |
When a vendor does not enforce by default, it may be because of the one legitimate case for skipping the check on EBGP sessions: Internet Exchange (IX) route servers. A route server distributes routes between fabric peers transparently, without appending its own AS to the AS_PATH, so peers do not need a new BGP session for every network that joins the fabric.
In practice, production networks have many more sessions with non-transparent neighbors than with route servers. Enabling no enforce-first-as on a few route-server sessions is far simpler than manually turning on enforce-first-as for every peer.
Safe-by-default remains the better protection against First AS violations, though persuading vendors to change longstanding defaults is a steep hill, as RFC 8212 acknowledges. Any change would also need a graceful mechanism so that IX route server sessions, which require no enforce-first-as to receive routes, keep working.
Why the check still matters alongside ASPA
Attackers malform AS_PATHs specifically to slip past BGP security mechanisms. Even RPKI-based ASPA path validation cannot stop a forged-origin hijack whose path has been stripped of everything but the origin AS, since nothing remains for ASPA to mark invalid.
The mitigation already exists: verify that the First AS matches the BGP peer AS and always enforce it. The relevant commands are listed in the "Documentation" column of the vendor table. Enforcing First AS is safe on any EBGP session except one facing an IX route server neighbor.
Network operators should enforce First AS on their routers now, for the sake of their own networks and the wider Internet. Anyone running a vendor or implementation that enforces by default is already rejecting First AS violations.



