CVE-2020-15157containerd can be coerced into leaking credentials during image pull
In containerd (an industry-standard container runtime) before version 1.2.14 there is a credential leaking vulnerability. If a container image manifest in the OCI Image format or Docker Image V2 Schema 2 format includes a URL for the location of a specific image layer (otherwise known as a “foreign layer”), the default containerd resolver will follow that URL to attempt to download it. In v1.2.x but not 1.3.0 or later, the default containerd resolver will provide its authentication credentials if the server where the URL is located presents an HTTP 401 status code along with registry-specific HTTP headers. If an attacker publishes a public image with a manifest that directs one of the layers to be fetched from a web server they control and they trick a user or system into pulling the image, they can obtain the credentials used for pulling that image. In some cases, this may be the user's username and password for the registry. In other cases, this may be the credentials attached to the cloud virtual instance which can grant access to other cloud resources in the account. The default containerd resolver is used by the cri-containerd plugin (which can be used by Kubernetes), the ctr development tool, and other client programs that have explicitly linked against it. This vulnerability has been fixed in containerd 1.2.14. containerd 1.3 and later are not affected. If you are using containerd 1.3 or later, you are not affected. If you are using cri-containerd in the 1.2 series or prior, you should ensure you only pull images from trusted sources. Other container runtimes built on top of containerd but not using the default resolver (such as Docker) are not affected.
What to do
Fixed builds are available from Debian, Go, Ubuntu: see the table below for the fixed version per release.
Ubuntu has not shipped a fix for every release yet.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 20.04 | docker.io | Fixed | 19.03.8-0ubuntu1.20.04.1 | UBUNTU-CVE-2020-15157 |
| Ubuntu 18.04 | docker.io | Fixed | 19.03.6-0ubuntu1~18.04.2 | UBUNTU-CVE-2020-15157 |
| Ubuntu 16.04 | containerd | Fixed | 1.2.6-0ubuntu1~16.04.4 | UBUNTU-CVE-2020-15157 |
| Ubuntu 16.04 | docker.io | Fixed | 18.09.7-0ubuntu1~16.04.6 | UBUNTU-CVE-2020-15157 |
| Ubuntu 14.04 | docker.io | Fix pending | ||
| Debian 14 | containerd | Fixed | 1.3.2~ds1-2 | DEBIAN-CVE-2020-15157 |
| Debian 14 | docker.io | Fixed | 19.03.13+dfsg2-1 | DEBIAN-CVE-2020-15157 |
| Debian 13 | containerd | Fixed | 1.3.2~ds1-2 | DEBIAN-CVE-2020-15157 |
| Debian 13 | docker.io | Fixed | 19.03.13+dfsg2-1 | DEBIAN-CVE-2020-15157 |
| Debian 12 | containerd | Fixed | 1.3.2~ds1-2 | DEBIAN-CVE-2020-15157 |
| Debian 12 | docker.io | Fixed | 19.03.13+dfsg2-1 | DEBIAN-CVE-2020-15157 |
| Go library | github.com/containerd/containerd | Fixed | 1.2.14 | GO-2022-0803 |
What the vendor says
As published in the CVE record by GitHub_M, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- containerd: affected: < 1.2.14
Vendor advisories:
- https://usn.ubuntu.com/4589-1/ (vendor-advisory)
- https://usn.ubuntu.com/4589-2/ (vendor-advisory)
- https://www.debian.org/security/2021/dsa-4865 (vendor-advisory)
References
- https://github.com/containerd/containerd/security/advisories/GHSA-742w-89gc-8m9c
- https://github.com/containerd/containerd/releases/tag/v1.2.14
- https://usn.ubuntu.com/4589-1/
- https://usn.ubuntu.com/4589-2/
- https://www.debian.org/security/2021/dsa-4865
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.