CVE-2021-3907 Arbitrary filepath traversal via URI injection

High 7.4 Published Updated

Attackers can write files outside the cache directory via URI injection, potentially leading to remote code execution on the host.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2021-3907?

CVE-2021-3907 is a high-severity path traversal vulnerability in Debian Debian Linux, published on 11 Nov 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official 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.

Weakness: CWE-22, CWE-20

Which versions are affected by CVE-2021-3907?

5 open source packages ship an affected version, including github.com/cloudflare/cfrpki. It affects 2 products.

PackageAffectedFixed in
github.com/cloudflare/cfrpki GoAll versions1.4.3
github.com/cloudflare/cfrpki GoAll versions1.4.3
github.com/cloudflare/cfrpki GoAll versions1.4.4
github.com/cloudflare/cfrpki GoAll versions1.4.4
github.com/cloudflare/cfrpki GoAll versions1.4.4

Products include Cloudflare Octorpki, Debian Debian Linux.

How do I fix CVE-2021-3907?

Upgrade github.com/cloudflare/cfrpki to a fixed version for your release line: 1.4.3 or 1.4.4.

Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.

Is CVE-2021-3907 being exploited?

There is no known exploitation of CVE-2021-3907 in the wild and no public exploit code.

All Debian Debian Linux vulnerabilities

Sources

Also known as DEBIAN-CVE-2021-3907, GHSA-8459-6rc9-8vf8, GHSA-cqh2-vc2f-q4fh, GO-2022-0248, UBUNTU-CVE-2021-3907.

Is CVE-2021-3907 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free