Vulnerability · Published Oct 4, 2021 · Assigned by GitHub_M
CVE-2021-41091Insufficiently restricted permissions on data directory in Docker Engine
Medium 6.3
In plain English
A medium-severity security flaw in moby from moby. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 2.8% (higher than 87% of all known vulnerabilities). Ready-made attack tooling exists: public proof-of-concept code. Fixed versions are available - upgrade the affected package.
Official description
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.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine:v3.20 | docker | 20.10.9-r0 | ALPINE-CVE-2021-41091 |
| Alpine:v3.21 | docker | 20.10.9-r0 | ALPINE-CVE-2021-41091 |
| Alpine:v3.22 | docker | 20.10.9-r0 | ALPINE-CVE-2021-41091 |
| Alpine:v3.23 | docker | 20.10.9-r0 | ALPINE-CVE-2021-41091 |
| Alpine:v3.24 | docker | 20.10.9-r0 | ALPINE-CVE-2021-41091 |
| Debian:12 | docker.io | 20.10.10+dfsg1-1 | DEBIAN-CVE-2021-41091 |
| Debian:13 | docker.io | 20.10.10+dfsg1-1 | DEBIAN-CVE-2021-41091 |
| Debian:14 | docker.io | 20.10.10+dfsg1-1 | DEBIAN-CVE-2021-41091 |
| Go | github.com/docker/docker | 20.10.9 | GHSA-3fwx-pjgw-3558 |
| Go | github.com/docker/docker | 20.10.9+incompatible | GO-2024-2500 |
| Go | github.com/moby/moby | 20.10.9+incompatible | GO-2024-2500 |
| Go | github.com/moby/moby | 20.10.9 | GHSA-3fwx-pjgw-3558 |
| Ubuntu:22.04:LTS | docker.io | 20.10.7-0ubuntu5 | UBUNTU-CVE-2021-41091 |
Affected products (as reported)
Weakness: CWE-281 · Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:L
References
- https://github.com/moby/moby/security/advisories/GHSA-3fwx-pjgw-3558 x_refsource_CONFIRM
- https://github.com/moby/moby/commit/f0ab919f518c47240ea0e72d0999576bb8008e64 x_refsource_MISC
- FEDORA-2021-df975338d4 vendor-advisory, x_refsource_FEDORA
- FEDORA-2021-b5a9a481a2 vendor-advisory, x_refsource_FEDORA
- https://cert-portal.siemens.com/productcert/pdf/ssa-222547.pdf x_refsource_CONFIRM