A set of RPKI validation vulnerabilities disclosed in an NCSC advisory, found by researchers at the University of Twente, exploited assumptions shared across several implementations of the software. Some of the issues were located in OctoRPKI, and Cloudflare has released v1.4.0 to remediate them. Cloudflare customers need to take no action, and no customer data was ever at risk. No attempted exploitation of the vulnerabilities has been observed.
OctoRPKI, part of the cfrpki toolkit, is used for BGP route validation, telling routers where to direct IP packets at Layer 3; TLS supplies integrity and confidentiality for customer data at the TCP layer if BGP is hijacked.
The software walks a set of trusted certificate repositories, downloading the records and manifests they hold and running validation checks on them. Valid content is written into a JSON file consumed by GoRTR instances. The list of trusted repositories can be found in the cfrpki tree.

Because OctoRPKI attempts to process any file it downloads, it is exposed to malicious input — a file with a path that performs directory traversal, for instance, or a GZIP bomb that crashes it. RFC6481 does not mandate limits on the content of files a repository returns, so a wide range of undefined behaviors is possible.
To validate attestations made in the context of the Resource Public
Key Infrastructure (RPKI) [RFC6480], relying parties (RPs) need
access to all the X.509/PKIX Resource Certificates, Certificate
Revocation Lists (CRLs), and signed objects that collectively define
the RPKI.
Each issuer of a certificate, CRL, or a signed object makes it
available for download to RPs through the publication of the object
in an RPKI repository.
The repository system is a collection of all signed objects that MUST
be globally accessible to all RPs. When certificates, CRLs and
signed objects are created, they are uploaded to a repository
publication point, from whence they can be downloaded for use by RPs.
Any single repository in the chain of trust can introduce such behavior. There may be hundreds of repositories under a trusted organization, and a compromise of just one is enough; alternatively, a malicious TAL file could be placed on the host running OctoRPKI. In either case, an attacker can lean on the fact that OctoRPKI processes arbitrary input to trigger undefined behavior. Since RFC6481 gives no further guidance, the primary mitigation was to fail closed whenever these events occur.
Two classes of attack
Arbitrary file writes
- CVE-2021-3907 — arbitrary filepath traversal via URI injection
OctoRPKI does not escape a URI whose filename contains .., so a malicious repository can create a file such as rsync://example.org/repo/../../etc/cron.daily/evil.roa, written to disk outside the base cache folder. That could allow remote code execution on the host running OctoRPKI. In v1.4.0, URIs are filtered and forced to stay within the cache folder by overriding any upwards directory traversal.
Crash or uncontrolled resource consumption
- CVE-2021-3908 — infinite certificate chain depth causes OctoRPKI to run forever
- CVE-2021-3909 — infinite open connection causes OctoRPKI to hang forever
- CVE-2021-3910 — NUL character in a ROA crashes OctoRPKI
- CVE-2021-3911 — misconfigured IP address field in a ROA crashes OctoRPKI
- CVE-2021-3912 — GZIP bomb from a malicious repository crashes OctoRPKI
Each of these causes a crash or endless runtime by abusing the processing of any ingested file. For production-critical software, undefined behavior must be identified early and either discarded or surfaced to the user as an error; repeated crashes open the door to denial-of-service attacks.
Bounds checking was added across many components. This includes checking array length before indexing specific locations, and using the controls Go provides in its HTTP client. Repositories that trip the bounds checks are skipped or reported in an error message to the user.
Commitment to RPKI security
Cloudflare describes the University of Twente research as welcome quality work in the RPKI space and a sign of progress given how recently the technology saw widespread adoption. The company says it remains committed to supporting RPKI and to working with the security community.



