CVE-2021-3761: OctoRPKI RPKI ROA maxLength Validation Vulnerability

github.com/cloudflare/cfrpki Updated 02 Oct 2025

Summary

15/07/2022
Yes i
High
7.5

CVE-2021-3761: Insufficient validation in github.com/cloudflare/cfrpki. Affects github.com/cloudflare/cfrpki versions < 1.3.0. Fixed in 1.3.0. How to fix ↓

Also tracked for

The same CVE-2021-3761 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

OctoRPKI is an open-source tool developed by Cloudflare for managing and validating Resource Public Key Infrastructure (RPKI) data. RPKI is a cryptographic framework used to secure the Internet's routing infrastructure by verifying the legitimacy of IP address prefixes announced by Autonomous Systems (ASes). OctoRPKI plays a crucial role in ensuring the integrity and security of RPKI data by validating Route Origin Authorizations (ROAs) provided by Certificate Authorities (CAs).

Vulnerability Detail

The vulnerability in OctoRPKI lies in its lack of contextual out-of-bounds check when validating RPKI ROA maxLength values. This allows a CA issuer to manipulate OctoRPKI into emitting an invalid VRP "MaxLength" value, leading to the termination of RTR (Router-to-Router) sessions. An attacker can exploit this vulnerability to disable RPKI Origin Validation in a victim network, such as AS 13335 (Cloudflare), before launching a BGP hijack that would normally be rejected as "RPKI invalid." Additionally, the flapping of RTR sessions could cause BGP routing churn, resulting in availability issues.

How To Fix

Latest published version: v1.5.10 as of 23 Oct 2026

go get github.com/cloudflare/cfrpki@v1.5.10

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

1.3.0

This is the first release that contains the fix.

go get github.com/cloudflare/cfrpki@v1.3.0

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

There is no known workaround for this vulnerability. It is recommended to apply the official fix by updating OctoRPKI to the latest version.

Conclusion

The vulnerability in OctoRPKI can be exploited by a CA issuer to disable RPKI Origin Validation in a victim network, potentially enabling BGP hijacking. It is crucial to update OctoRPKI to version 1.3.0 or later to mitigate this vulnerability. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for github.com/cloudflare/cfrpki →

Share this vulnerability

FAQ

OctoRPKI is an open-source tool developed by Cloudflare for managing and validating Resource Public Key Infrastructure (RPKI) data. It plays a crucial role in securing the Internet's routing infrastructure.

RPKI stands for Resource Public Key Infrastructure. It is a cryptographic framework used to secure the Internet's routing infrastructure by verifying the legitimacy of IP address prefixes announced by Autonomous Systems (ASes).

A Route Origin Authorization (ROA) is a digital certificate that specifies the IP address prefixes that an Autonomous System (AS) is authorized to announce. It is used in RPKI to validate the origin of BGP route announcements.

A VRP "MaxLength" value is a parameter in RPKI that specifies the maximum length (in bits) of an IP address prefix allowed for a specific ROA. It is used to ensure that only valid IP address prefixes are announced by ASes.

BGP hijacking is a malicious activity where an attacker illegitimately announces IP address prefixes to redirect traffic intended for a specific destination. RPKI Origin Validation helps prevent BGP hijacking by verifying the legitimacy of route announcements.

Related vulnerabilities

Recent vulnerabilities recorded for github.com/cloudflare/cfrpki.

How To Fix

Latest published version: v1.5.10 as of 23 Oct 2026

go get github.com/cloudflare/cfrpki@v1.5.10

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

1.3.0

This is the first release that contains the fix.

go get github.com/cloudflare/cfrpki@v1.3.0

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback