{"id":"CVE-2021-3761","aliases":["CVE-2021-3761","GHSA-c8xp-8mf3-62h9","GO-2022-0246"],"related":[],"kind":"vulnerability","state":"published","title":"OctoRPKI lacks contextual out-of-bounds check when validating RPKI ROA maxLength values","summary":"Any CA issuer in the RPKI can trick OctoRPKI prior to 1.3.0 into emitting an invalid VRP \"MaxLength\" value, causing RTR sessions to terminate. 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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Any CA issuer in the RPKI can trick OctoRPKI prior to 1.3.0 into emitting an invalid VRP \"MaxLength\" value, causing RTR sessions to terminate. 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.","source":"cvelist"},{"lang":"en","text":"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. \n\n### Impact\n\nAn 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.\n\n### Patches\nhttps://github.com/cloudflare/cfrpki/commit/a8db4e009ef217484598ba1fd1c595b54e0f6422\n\nhttps://github.com/cloudflare/cfrpki/releases/tag/v1.3.0\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Email us at [security@cloudflare.com](security@cloudflare.com)","format":"markdown","source":"ghsa"},{"lang":"en","text":"The ROAEntry.Validate function fails to perform bounds checks on the MaxLength field, allowing invalid values to pass validation.","format":"markdown","source":"go"},{"lang":"es","text":"Cualquier emisor de CA en la RPKI puede engañar a OctoRPKI anterior a versión 1.3.0 para que emita un valor \"MaxLength\" de VRP no válido, causando la terminación de las sesiones RTR. Un atacante puede usar esto para deshabilitar la Comprobación de Origen RPKI en una red víctima (por ejemplo AS 13335 - Cloudflare) antes de lanzar un hijack BGP que durante las operaciones normales sería rechazado como \"RPKI invalid\". Además, en determinados despliegues, la ruptura de la sesión de RTR también podría causar por sí misma la ruptura del enrutamiento BGP, causando problemas de disponibilidad","source":"nvd"}],"published":"2021-09-07T23:02:18.000Z","modified":"2026-07-08T06:27:57.548Z","severity":{"scorer":"cloudflare","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},"severities":[{"scorer":"cloudflare","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:L/Au:N/C:N/I:N/A:P","score":5,"rating":"MEDIUM"}],"cwes":["CWE-295","CWE-787"],"affected":[{"ranges":[{"type":"custom","introduced":"unspecified","fixed":"1.3.0","status":"affected"}],"vendor":"Cloudflare","product":"octorpki","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"1.3.0"}],"ecosystem":"Go","package":"github.com/cloudflare/cfrpki","purl":"pkg:golang/github.com/cloudflare/cfrpki","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"1.3.0"}],"ecosystem":"Go","package":"github.com/cloudflare/cfrpki","purl":"pkg:golang/github.com/cloudflare/cfrpki","source":"go"},{"ranges":[{"status":"affected","fixed":"1.3.0"}],"vendor":"cloudflare","product":"octorpki","cpe":"cpe:2.3:a:cloudflare:octorpki:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"status":"affected","version":"11.0"}],"vendor":"debian","product":"debian_linux","cpe":"cpe:2.3:o:debian:debian_linux:11.0:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/cloudflare/cfrpki/security/advisories/GHSA-c8xp-8mf3-62h9","tags":["patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://www.debian.org/security/2022/dsa-5041","tags":["third-party-advisory","vendor-advisory","web","x-refsource-debian","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-3761","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/cloudflare/cfrpki/pull/90","tags":["fix","web"],"sources":["ghsa","go"]},{"url":"https://github.com/cloudflare/cfrpki/commit/a8db4e009ef217484598ba1fd1c595b54e0f6422","tags":["fix","web"],"sources":["ghsa","go"]},{"url":"https://github.com/cloudflare/cfrpki/releases/tag/v1.3.0","tags":["web"],"sources":["ghsa"]},{"url":"https://pkg.go.dev/vuln/GO-2022-0246","tags":["web"],"sources":["ghsa"]}],"credits":["Job Snijders"],"assigner":"cloudflare","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2021-3761","url":"https://www.cve.org/CVERecord?id=CVE-2021-3761","licence":"CVE Terms of Use","modified":"2024-09-17T02:56:31.062Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-c8xp-8mf3-62h9","url":"https://github.com/advisories/GHSA-c8xp-8mf3-62h9","licence":"CC-BY-4.0","modified":"2026-07-08T06:27:57.548Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2022-0246","url":"https://pkg.go.dev/vuln/GO-2022-0246","licence":"CC-BY-4.0","modified":"2024-05-20T16:03:47.000Z"},{"source":"nvd","name":"NVD","id":"CVE-2021-3761","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-3761","licence":"Public domain","modified":"2026-06-17T04:05:42.900Z"}],"updatedAt":"2026-11-25T22:58:03.859Z","epss":{"score":0.01216,"percentile":0.69432,"date":"2026-12-01T12:00:22.000Z"}}