CVEfocus › CVE database › CVE-2021-21284

CVE-2021-21284privilege escalation in Moby

CVSS 6.8 MediumEPSS 1.1% (higher than 65% of CVEs)Published 2021-02-02Updated 2024-08-03Assigner: GitHub_M

In Docker before versions 9.03.15, 20.10.3 there is a vulnerability involving the --userns-remap option in which access to remapped root allows privilege escalation to real root. When using "--userns-remap", if the root user in the remapped namespace has access to the host filesystem they can modify files under "/var/lib/docker/<remapping>" that cause writing files with extended privileges. Versions 20.10.3 and 19.03.15 contain patches that prevent privilege escalation from remapped user.

CWE-22

What to do

Fixed builds are available from Alpine, 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

19Fixed
2Fix pending
1Will not fix
2Not affected

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 26.04docker.ioNot affected
vulnerable_code_not_present
Ubuntu 25.10docker.ioNot affected
vulnerable_code_not_present
Ubuntu 20.04docker.ioFixed20.10.7-0ubuntu1~20.04.1UBUNTU-CVE-2021-21284
Ubuntu 18.04docker.ioFixed20.10.7-0ubuntu1~18.04.1UBUNTU-CVE-2021-21284
Ubuntu 16.04docker.ioFix pendingUBUNTU-CVE-2021-21284
Ubuntu 14.04docker.ioFix pending
Debian 14docker.ioFixed20.10.3+dfsg1-1DEBIAN-CVE-2021-21284
Debian 13docker.ioFixed20.10.3+dfsg1-1DEBIAN-CVE-2021-21284
Debian 12docker.ioFixed20.10.3+dfsg1-1DEBIAN-CVE-2021-21284
Red Hat Enterprise Linux 7dockerWill not fix
Out of support scope
Alpine Linux 3.24dockerFixed20.10.3-r0ALPINE-CVE-2021-21284
Alpine Linux 3.23dockerFixed20.10.3-r0ALPINE-CVE-2021-21284
Alpine Linux 3.22dockerFixed20.10.3-r0ALPINE-CVE-2021-21284
Alpine Linux 3.21dockerFixed20.10.3-r0ALPINE-CVE-2021-21284
Alpine Linux 3.20dockerFixed20.10.3-r0ALPINE-CVE-2021-21284
Alpine Linux 3.19dockerFixed20.10.3-r0ALPINE-CVE-2021-21284
Alpine Linux 3.18dockerFixed20.10.3-r0ALPINE-CVE-2021-21284
Alpine Linux 3.17dockerFixed20.10.3-r0ALPINE-CVE-2021-21284
Alpine Linux 3.16dockerFixed20.10.3-r0ALPINE-CVE-2021-21284
Alpine Linux 3.15dockerFixed20.10.3-r0ALPINE-CVE-2021-21284
Alpine Linux 3.14dockerFixed20.10.3-r0ALPINE-CVE-2021-21284
Alpine Linux 3.13dockerFixed20.10.3-r0ALPINE-CVE-2021-21284
Alpine Linux 3.12dockerFixed20.10.3-r0ALPINE-CVE-2021-21284
Go librarygithub.com/moby/mobyFixed19.3.15GHSA-7452-xqpj-6rpc

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.