When a Valid ROA Still Leaves a Hole
Key takeaways
- Route Origin Validation checks the origin ASN and prefix length against covering ROAs, but it does not authenticate the rest of the AS path.
- A ROA for a /22 with maxLength /24 pre-authorizes every /24 inside that block if an attacker spoofs the authorized origin ASN in the AS path.
- IPinfo research on a 28 September 2026 sample found that 16.2% of RPKI-covered IPv4 routes had a covering authorization permitting longer unannounced prefixes.
- RFC 9319 recommends minimal-length ROAs that authorize only the exact prefixes actually announced in BGP.
On this page
A Route Origin Authorization (ROA) with a permissive maxLength can leave unannounced sub-prefixes exposed to forged-origin BGP hijacks even when your aggregate route shows RPKI-valid. Because BGP prefers the most specific prefix, an attacker who announces a longer prefix inside your ROA's permitted range and appends your authorized origin ASN to the AS path can pass Route Origin Validation (ROV) everywhere.
Publishing a ROA is a major step forward for BYOIP and routing security, but "Valid" is only as tight as the prefix lengths you authorize. Understanding how covering ROAs interact with longest-prefix match explains why RFC 9319 recommends minimal-length ROAs.
How a loose maxLength creates a forged-origin opening
Suppose your organization holds 198.51.100.0/22 (four contiguous /24 blocks) and originates only the single 198.51.100.0/22 aggregate from AS64496. When creating the ROA, an operator sets maxLength: 24 "just in case" the team later splits the block into /24 announcements.
That single setting changes what validating routers accept across the Internet:
| Announcement | AS path | ROV state under /22-24 AS64496 | ROV state under tight /22-22 AS64496 |
|---|---|---|---|
Legitimate 198.51.100.0/22 | ... 64496 | Valid | Valid |
Hijacker 198.51.100.0/24 (unauthorized origin) | ... 64511 | Invalid (wrong origin ASN) | Invalid (wrong origin ASN and length) |
Hijacker 198.51.100.0/24 (forged origin) | ... 64511 64496 | Valid (wins longest-prefix match) | Invalid (exceeds maxLength 22) |
Route Origin Validation (RFC 6811) checks only two things against the covering ROA: whether the rightmost ASN in the AS_PATH matches the ROA's origin ASN, and whether the announced prefix length is less than or equal to maxLength. It does not verify that AS64496 actually sent the announcement to AS64511.
When the ROA permits /24 and the legitimate holder only announces /22, no legitimate /24 route exists in global routing tables to compete with the forged /24. Every network on the Internet prefers a valid /24 over a valid /22.
What recent incidents and measurements show
This is not a purely theoretical edge case. In the August 2026 BGP hijack affecting Virtualizor's infrastructure, routing analysis showed an unauthorized more-specific route announced with the legitimate origin ASN appended to the AS path while a covering ROA permitted the longer prefix. Because both the origin ASN and prefix length satisfied the ROA, Origin Validation alone could not reject the route.
Subsequent IPinfo research on a 28 September 2026 routing sample (using routes visible from at least two public-collector peers) found that 16.2% of RPKI-covered IPv4 routes had a covering authorization that permitted longer prefixes without an operator-announced more-specific route filling that space. That 16.2% figure measures structural exposure rather than a count of active attacks, and it shows how often operators over-provision maxLength.
Minimal-length ROAs vs cloud BYOIP requirements
IETF operational guidance in RFC 9319 (Section 5) is direct: avoid using maxLength wider than the prefix itself unless every permitted sub-prefix is actually announced, and instead publish discrete ROAs for the exact prefixes in your routing plan.
When onboarding a prefix to a cloud BYOIP platform, check how the platform's control plane validates and subdivides your block:
- Single aggregate announcement: If you import a
/22or/24and announce it only as that single block, setmaxLengthequal to the prefix length (/22for a/22,/24for a/24). - Google Cloud Standard Tier: Google's documentation explicitly recommends publishing separate exact-length ROAs for the public advertised prefix and for each delegated sub-prefix you provision, rather than one wide covering ROA, when you want the tightest authorization scope.
- AWS VPC IPAM: AWS IPAM requires
maxLengthto allow/24for IPv4 (and/48for IPv6) on advertisable pools so you can allocate regional CIDRs. When a platform requires a widermaxLength, pair your ROA with BGP monitoring for unexpected sub-prefixes and path validation controls such as ASPA.
Step-by-step process for tightening permissive ROAs
Never delete an existing ROA before its replacement has propagated to relying-party caches, or your live routes will briefly evaluate as NotFound or Invalid. Follow this make-before-break process.
Compare
Match ROA maxLength against live BGP
Export your current RPKI ROAs and compare each entry's maxLength against the prefixes you actually originate in BGP.
- Flag any ROA where
maxLengthis longer than the announced prefix (for example, a/21ROA withmaxLength: 24where only the/21is announced). - Check whether a cloud BYOIP service (such as AWS VPC IPAM) mandates that wider
maxLengthbefore changing it.
FAQ
Related resources
Ready to see where BYOIP is supported?
Continue the series
What a BGP Tunnel Filter Actually Does
Import and export prefix filters control which routes cross a GRE or IPsec BGP session. Learn how allow and deny profiles behave, why explicit tunnel prefixes can bypass export filters, and why inbound route limits apply before filtering.
9 min read · Updated 19 October 2026
Read articleASPA After You Already Publish ROAs
ROAs verify which ASN may originate a prefix, but they cannot detect route leaks or forged upstream paths. Learn how Autonomous System Provider Authorization (ASPA) validates Customer-to-Provider hops and how to prepare your records.
10 min read · Updated 19 October 2026
Read article