CVE-2021-3762 Path traversal in claircore
An attacker can achieve arbitrary file write and potential remote code execution by supplying a crafted container image to the Clair scanner.
- 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-3762?
CVE-2021-3762 is a critical path traversal vulnerability in quay/claircore, published on 3 Mar 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
A directory traversal vulnerability was found in the ClairCore engine of Clair. An attacker can exploit this by supplying a crafted container image which, when scanned by Clair, allows for arbitrary file write on the filesystem, potentially allowing for remote code execution.
Weakness: CWE-22
Which versions are affected by CVE-2021-3762?
7 open source packages ship an affected version, including github.com/quay/claircore. It affects 2 products.
| Package | Affected | Fixed in |
|---|---|---|
github.com/quay/claircore Go | All versions | 0.4.8 |
github.com/quay/claircore Go | All versions | 0.4.8 |
github.com/quay/claircore Go | All versions | 1.1.0 |
github.com/quay/claircore Go | From 0.5.0 | 0.5.5 |
github.com/quay/claircore Go | From 0.5.0 | 0.5.5 |
github.com/quay/claircore Go | From 1.0.0 | 1.1.0 |
1 more packages
github.com/quay/claircore Go | From 1.0.0 | 1.1.0 |
Products include Redhat Clair, Redhat Quay.
How do I fix CVE-2021-3762?
Upgrade github.com/quay/claircore to a fixed version for your release line: 0.4.8, 1.1.0 or 0.5.5.
Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.
Is CVE-2021-3762 being exploited?
There is no known exploitation of CVE-2021-3762 in the wild and no public exploit code.
Sources
Also known as GHSA-mq47-6wwv-v79w, GO-2022-0346.