CVEfocus › CVE database › CVE-2020-15157

CVE-2020-15157containerd can be coerced into leaking credentials during image pull

CVSS 6.1 MediumEPSS 2.3% (higher than 84% of CVEs)Published 2020-10-16Updated 2024-08-04Assigner: GitHub_M

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.

CWE-522

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

11Fixed
1Fix pending

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.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 20.04docker.ioFixed19.03.8-0ubuntu1.20.04.1UBUNTU-CVE-2020-15157
Ubuntu 18.04docker.ioFixed19.03.6-0ubuntu1~18.04.2UBUNTU-CVE-2020-15157
Ubuntu 16.04containerdFixed1.2.6-0ubuntu1~16.04.4UBUNTU-CVE-2020-15157
Ubuntu 16.04docker.ioFixed18.09.7-0ubuntu1~16.04.6UBUNTU-CVE-2020-15157
Ubuntu 14.04docker.ioFix pending
Debian 14containerdFixed1.3.2~ds1-2DEBIAN-CVE-2020-15157
Debian 14docker.ioFixed19.03.13+dfsg2-1DEBIAN-CVE-2020-15157
Debian 13containerdFixed1.3.2~ds1-2DEBIAN-CVE-2020-15157
Debian 13docker.ioFixed19.03.13+dfsg2-1DEBIAN-CVE-2020-15157
Debian 12containerdFixed1.3.2~ds1-2DEBIAN-CVE-2020-15157
Debian 12docker.ioFixed19.03.13+dfsg2-1DEBIAN-CVE-2020-15157
Go librarygithub.com/containerd/containerdFixed1.2.14GO-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.

Vendor advisories:

References

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.