---
id: CVE-2021-3761
aliases:
  - GHSA-c8xp-8mf3-62h9
  - GO-2022-0246
title: >-
  OctoRPKI lacks contextual out-of-bounds check when validating RPKI ROA
  maxLength values
summary: >-
  OctoRPKI lacks contextual out-of-bounds check when validating RPKI ROA
  maxLength values
severity: high
cvss: 7.5
cvssVector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H'
vendor: cloudflare
product: github.com/cloudflare/cfrpki
ecosystem: go
affected:
  - github.com/cloudflare/cfrpki < 1.3.0
patched:
  - github.com/cloudflare/cfrpki 1.3.0
published: '2021-09-07'
updated: '2026-07-08'
source: OSV
sourceUrl: 'https://osv.dev/vulnerability/GHSA-c8xp-8mf3-62h9'
references:
  - url: >-
      https://github.com/cloudflare/cfrpki/security/advisories/GHSA-c8xp-8mf3-62h9
  - url: 'https://nvd.nist.gov/vuln/detail/CVE-2021-3761'
  - url: 'https://github.com/cloudflare/cfrpki/pull/90'
  - url: >-
      https://github.com/cloudflare/cfrpki/commit/a8db4e009ef217484598ba1fd1c595b54e0f6422
  - url: 'https://github.com/cloudflare/cfrpki/releases/tag/v1.3.0'
  - url: 'https://pkg.go.dev/vuln/GO-2022-0246'
  - url: 'https://www.debian.org/security/2022/dsa-5041'
  - url: github.com/cloudflare/cfrpki
tags:
  - osv
  - go
epss: 0.01216
epssPercentile: 0.67266
ingestedAt: '2026-07-09T18:56:36.322Z'
---

## Overview

Any CA issuer in the RPKI can trick OctoRPKI prior to https://github.com/cloudflare/cfrpki/commit/a8db4e009ef217484598ba1fd1c595b54e0f6422 into emitting an invalid VRP "MaxLength" value, causing RTR sessions to terminate. 

### Impact

An attacker can use this to disable RPKI Origin Validation in a victim network (for example AS 13335 - Cloudflare) prior to launching a BGP hijack which during normal operations would be rejected as "RPKI invalid". Additionally, in certain deployments RTR session flapping in and of itself also could cause BGP routing churn, causing availability issues.

### Patches
https://github.com/cloudflare/cfrpki/commit/a8db4e009ef217484598ba1fd1c595b54e0f6422

https://github.com/cloudflare/cfrpki/releases/tag/v1.3.0

### For more information
If you have any questions or comments about this advisory:
* Email us at [security@cloudflare.com](security@cloudflare.com)


## Affected packages

- `github.com/cloudflare/cfrpki < 1.3.0`

## Remediation

Upgrade to a patched release:

- `github.com/cloudflare/cfrpki 1.3.0`
