{"id":"CVE-2021-21284","published":"2021-02-02T17:55:22Z","modified":"2024-08-03T18:09:15Z","title":"privilege escalation in Moby","vendor":"moby","product":"moby","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":6.8,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:A/AC:L/PR:L/UI:N/S:C/C:N/I:H/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.01078,"percentile":0.64579,"provenance":"source"},"cwes":[{"id":"CWE-22","name":"Improper Limitation of a Pathname to a Restricted Directory"}],"references":[{"url":"https://docs.docker.com/engine/release-notes/#20103","tags":["x_refsource_MISC"]},{"url":"https://github.com/moby/moby/releases/tag/v20.10.3","tags":["x_refsource_MISC"]},{"url":"https://github.com/moby/moby/releases/tag/v19.03.15","tags":["x_refsource_MISC"]},{"url":"https://github.com/moby/moby/security/advisories/GHSA-7452-xqpj-6rpc","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/moby/moby/commit/64bd4485b3a66a597c02c95f5776395e540b2c7c","tags":["x_refsource_MISC"]},{"url":"https://security.netapp.com/advisory/ntap-20210226-0005/","tags":["x_refsource_CONFIRM"]},{"url":"https://www.debian.org/security/2021/dsa-4865","tags":["vendor-advisory","x_refsource_DEBIAN"]},{"url":"https://security.gentoo.org/glsa/202107-23","tags":["vendor-advisory","x_refsource_GENTOO"]}],"priority":{"score":17.7,"factors":[{"name":"EPSS percentile","points":12.92},{"name":"CVSS severity","points":4.76}]},"vendorSlug":"moby","affectedVersions":[{"vendor":"moby","product":"moby","versions":["< 19.03.15",">= 20.0.0, < 20.10.3"]}],"affected":[{"ecosystem":"Go","package":"github.com/moby/moby","vulnerableRanges":["<19.3.15",">=20.10.0-beta1, <20.10.3"],"patched":["19.3.15","20.10.3"],"from":["GHSA-7452-xqpj-6rpc"],"provenance":"source"}],"summary":{"text":"A privilege escalation flaw in Moby's handling of the --userns-remap option allows the root user inside the remapped namespace to escape to real host root by modifying files under /var/lib/docker/<remapping>, causing files to be written with extended privileges. An attacker needs adjacent network access, low privileges, and no user interaction, and the flaw affects Docker versions before 9.03.15 and 20.10.3, which are fixed in those releases.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T20:38:07Z"},"euvd":{"id":"EUVD-2024-0280","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-moby-cve-2021-21284","children":[{"from":"CVE-2021-21284","to":"CVE-2021-41091","relation":"successor","confidence":"high","kind":"lineage","evidence":[{"kind":"version-step","provenance":"source","package":"Go:github.com/moby/moby","fromFixed":"20.10.3","toFixed":"20.10.9","daysApart":244},{"kind":"same-code","provenance":"machine","files":["daemon/container_operations_unix.go","daemon/create.go","daemon/daemon.go","daemon/daemon_unix.go","daemon/graphdriver/aufs/aufs.go"],"commits":["https://github.com/moby/moby/commit/64bd4485b3a66a597c02c95f5776395e540b2c7c","https://github.com/moby/moby/commit/f0ab919f518c47240ea0e72d0999576bb8008e64"],"basis":"shared function","functions":["Create","Init","NewDaemon","create","setupContainerMountsRoot"]}]}],"packageHistory":[{"cve":"CVE-2017-16539","published":"2017-11-04","fixed":"17.12.0-ce","kev":false},{"cve":"CVE-2020-27534","published":"2020-12-30","fixed":"19.03.9","kev":false,"link":{"from":"CVE-2020-27534","to":"CVE-2021-21284","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"Go:github.com/moby/moby","fromFixed":"19.03.9","toFixed":"19.3.15","daysApart":34}]}},{"cve":"CVE-2019-14271","published":"2019-07-29","fixed":"20.10.0-beta1+incompatible","kev":false,"link":{"from":"CVE-2019-14271","to":"CVE-2021-21284","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"Go:github.com/moby/moby","fromFixed":"20.10.0-beta1+incompatible","toFixed":"20.10.3","daysApart":554}]}},{"cve":"CVE-2021-21284","published":"2021-02-02","fixed":"20.10.3","kev":false},{"cve":"CVE-2021-21285","published":"2021-02-02","fixed":"20.10.3","kev":false},{"cve":"CVE-2021-41089","published":"2021-10-04","fixed":"20.10.9+incompatible","kev":false},{"cve":"CVE-2021-41091","published":"2021-10-04","fixed":"20.10.9+incompatible","kev":false}],"package":"Go:github.com/moby/moby"}}