{"id":"CVE-2021-41091","published":"2021-10-04T20:20:09Z","modified":"2024-08-04T02:59:31Z","title":"Insufficiently restricted permissions on data directory in Docker Engine","vendor":"moby","product":"moby","tier":"tail","description":{"text":"Moby is an open-source project created by Docker to enable software containerization. A bug was found in Moby (Docker Engine) where the data directory (typically `/var/lib/docker`) contained subdirectories with insufficiently restricted permissions, allowing otherwise unprivileged Linux users to traverse directory contents and execute programs. When containers included executable programs with extended permission bits (such as `setuid`), unprivileged Linux users could discover and execute those programs. When the UID of an unprivileged Linux user on the host collided with the file owner or group inside a container, the unprivileged Linux user on the host could discover, read, and modify those files. This bug has been fixed in Moby (Docker Engine) 20.10.9. Users should update to this version as soon as possible. Running containers should be stopped and restarted for the permissions to be fixed. For users unable to upgrade limit access to the host to trusted users. Limit access to host volumes to trusted containers.","provenance":"source","from":"CVE.org"},"cvss":{"score":6.3,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:L","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.02848,"percentile":0.87035,"provenance":"source"},"cwes":[{"id":"CWE-281","name":"Improper Preservation of Permissions"}],"references":[{"url":"https://github.com/moby/moby/security/advisories/GHSA-3fwx-pjgw-3558","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/moby/moby/commit/f0ab919f518c47240ea0e72d0999576bb8008e64","tags":["x_refsource_MISC"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/ZNFADTCHHYWVM6W4NJ6CB4FNFM2VMBIB/","tags":["vendor-advisory","x_refsource_FEDORA"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/B5Q6G6I4W5COQE25QMC7FJY3I3PAYFBB/","tags":["vendor-advisory","x_refsource_FEDORA"]},{"url":"https://cert-portal.siemens.com/productcert/pdf/ssa-222547.pdf","tags":["x_refsource_CONFIRM"]}],"priority":{"score":26.8,"factors":[{"name":"EPSS percentile","points":17.41},{"name":"Public exploit code","points":5.0},{"name":"CVSS severity","points":4.41}]},"exploitSources":{"pocGithub":{"count":2,"skipped":1,"earliest":"2023-05-02","earliestUrl":"https://github.com/UncleJ4ck/CVE-2021-41091","repos":[{"name":"UncleJ4ck/CVE-2021-41091","url":"https://github.com/UncleJ4ck/CVE-2021-41091","stars":66,"created":"2023-05-02"},{"name":"SNE-M23-SN/Vulnerable-Docker-Engine","url":"https://github.com/SNE-M23-SN/Vulnerable-Docker-Engine","stars":2,"created":"2024-06-30"}]},"first":{"date":"2023-05-02","source":"PoC-in-GitHub","url":"https://github.com/UncleJ4ck/CVE-2021-41091"},"provenance":"source"},"vendorSlug":"moby","affectedVersions":[{"vendor":"moby","product":"moby","versions":["< 20.10.9"]}],"affected":[{"ecosystem":"Go","package":"github.com/moby/moby","vulnerableRanges":["<20.10.9","<20.10.9+incompatible"],"patched":["20.10.9","20.10.9+incompatible"],"from":["GHSA-3fwx-pjgw-3558","GO-2024-2500"],"provenance":"source"},{"ecosystem":"Go","package":"github.com/docker/docker","vulnerableRanges":["<20.10.9","<20.10.9+incompatible"],"patched":["20.10.9","20.10.9+incompatible"],"from":["GHSA-3fwx-pjgw-3558","GO-2024-2500"],"provenance":"source"}],"summary":{"text":"The flaw is insufficiently restricted permissions on subdirectories of the Docker Engine data directory (typically /var/lib/docker) in Moby, the open-source project behind Docker Engine. An attacker with a local, unprivileged account on the host can traverse these directories and run container programs with extended permission bits such as setuid, and can read or modify container files when their host UID collides with a file owner or group inside a container.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T07:05:11Z"},"euvd":{"id":"EUVD-2024-0231","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-moby-cve-2021-21284","parents":[{"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-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,"link":{"from":"CVE-2021-41091","to":"CVE-2021-41089","relation":"successor","confidence":"medium","kind":"sequence","orderedBy":"description","evidence":[{"kind":"version-step","provenance":"source","package":"Go:github.com/moby/moby","fromFixed":"20.10.9","toFixed":"20.10.9+incompatible","daysApart":0},{"kind":"similar","provenance":"machine","score":0.27,"basis":"same product + CWE + description similarity"}]}},{"cve":"CVE-2021-41091","published":"2021-10-04","fixed":"20.10.9+incompatible","kev":false},{"cve":"CVE-2022-24769","published":"2022-03-24","fixed":"20.10.14+incompatible","kev":false},{"cve":"CVE-2024-24557","published":"2024-02-01","fixed":"25.0.2+incompatible","kev":false},{"cve":"CVE-2024-36621","published":"2024-11-29","fixed":"26.0.0+incompatible","kev":false}],"package":"Go:github.com/moby/moby"}}