CVE-2021-3907
JSON

7.4high

Arbitrary filepath traversal via URI injection

Severity
7.4high CVSS:3.1 by cloudflare
Exploit likelihood
4.12% (higher than 91% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
cloudflare
Also known as
GHSA-8459-6rc9-8vf8GHSA-cqh2-vc2f-q4fhGO-2022-0248

Description

OctoRPKI does not escape a URI with a filename containing "..", this allows a repository to create a file, (ex. rsync://example.org/repo/../../etc/cron.daily/evil.roa), which would then be written to disk outside the base cache folder. This could allow for remote code execution on the host machine OctoRPKI is running on.

Affected

Product or packageVersionsReported by
Cloudflare octorpkifrom unspecified before 1.4.3, before 1.3.0CVE List, NVD
github.com/cloudflare/cfrpki (Go)before 1.4.3, before 1.4.4GitHub Advisory Database, Go Vulnerability Database
debian debian_linux10.0, 11.0NVD

All scores

cloudflare7.4high CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:H
GitHublow rating
GitHub7.4high CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:H
NVD9.8critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
NVD7.5high CVSS:2.0AV:N/AC:L/Au:N/C:P/I:P/A:P

Classification

What each source says

CVE List

OctoRPKI does not escape a URI with a filename containing "..", this allows a repository to create a file, (ex. rsync://example.org/repo/../../etc/cron.daily/evil.roa), which would then be written to disk outside the base cache folder. This could allow for remote code execution on the host machine OctoRPKI is running on.

GitHub Advisory Database
Impact

In the case that a malicious TAL file is parsed pointing to a repository that provides a malicious ROA file which octorpki downloads, it is possible to bypass the current directory traversal mitigation to allow writing outside of the current directory.

Patches

No patch release has been made

GitHub Advisory Database

OctoRPKI does not escape a URI with a filename containing "..", this allows a repository to create a file, (ex. rsync://example.org/repo/../../etc/cron.daily/evil.roa), which would then be written to disk outside the base cache folder. This could allow for remote code execution on the host machine OctoRPKI is running on.

Patches

For more information

If you have any questions or comments about this advisory email us at security@cloudflare.com

Go Vulnerability Database

Manifest path extraction is vulnerable to directory traversal attacks.

The ExtractPathManifest function permits file paths containing relative directory components (".."), permitting files to reference arbitrary locations on the filesystem.

NVD (es)

OctoRPKI no escapa a un URI con un nombre de archivo que contenga "..", esto permite que un repositorio cree un archivo, (ej. rsync://ejemplo.org/repo/../../etc/cron.daily/evil.roa), que luego sería escrito en el disco fuera de la carpeta de caché base. Esto podría permitir una ejecución de código remota en la máquina anfitriona en la que se ejecuta OctoRPKI

References

https://github.com/cloudflare/cfrpki/security/advisories/GHSA-cqh2-vc2f-q4fhthird-party-advisory, web
https://www.debian.org/security/2021/dsa-5033third-party-advisory, vendor-advisory, web
https://www.debian.org/security/2022/dsa-5041third-party-advisory, vendor-advisory, web
https://github.com/cloudflare/cfrpki/security/advisories/GHSA-3jhm-87m6-x959third-party-advisory, web
https://github.com/cloudflare/cfrpki/security/advisories/GHSA-8459-6rc9-8vf8web
https://github.com/cloudflare/cfrpki/commit/a053a808feeb3115c76b6cc263ee55598ce6e8cdfix, web
https://github.com/cloudflare/cfrpki/commit/eb9cc4db7b7b79e44f56dfaa959fccdfb2af8284fix, web
https://github.com/cloudflare/cfrpkipackage
https://github.com/cloudflare/cfrpki/releases/tag/v1.4.3web
https://nvd.nist.gov/vuln/detail/CVE-2021-3907advisory
https://pkg.go.dev/vuln/GO-2022-0248web

Related

Sources

SourceRecordLicence
CVE ListCVE-2021-3907 changed 2024-09-17CVE Terms of Use
GitHub Advisory DatabaseGHSA-8459-6rc9-8vf8 changed 2025-01-14CC-BY-4.0
GitHub Advisory DatabaseGHSA-cqh2-vc2f-q4fh changed 2026-02-04CC-BY-4.0
Go Vulnerability DatabaseGO-2022-0248 changed 2026-02-04CC-BY-4.0
NVDCVE-2021-3907 changed 2026-06-17Public domain