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.

Severity (CVSS 3.1)6.3Medium
Exploit odds (30 days)2.8%top 13.2% of all CVEs
Exploited in the wildNo reportsnot in CISA KEV
Attack tooling1Public PoC

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

EcosystemPackageFixed inAdvisory
Alpine:v3.20docker20.10.9-r0ALPINE-CVE-2021-41091
Alpine:v3.21docker20.10.9-r0ALPINE-CVE-2021-41091
Alpine:v3.22docker20.10.9-r0ALPINE-CVE-2021-41091
Alpine:v3.23docker20.10.9-r0ALPINE-CVE-2021-41091
Alpine:v3.24docker20.10.9-r0ALPINE-CVE-2021-41091
Debian:12docker.io20.10.10+dfsg1-1DEBIAN-CVE-2021-41091
Debian:13docker.io20.10.10+dfsg1-1DEBIAN-CVE-2021-41091
Debian:14docker.io20.10.10+dfsg1-1DEBIAN-CVE-2021-41091
Gogithub.com/docker/docker20.10.9GHSA-3fwx-pjgw-3558
Gogithub.com/docker/docker20.10.9+incompatibleGO-2024-2500
Gogithub.com/moby/moby20.10.9+incompatibleGO-2024-2500
Gogithub.com/moby/moby20.10.9GHSA-3fwx-pjgw-3558
Ubuntu:22.04:LTSdocker.io20.10.7-0ubuntu5UBUNTU-CVE-2021-41091

Affected products (as reported)

VendorProductVersions
moby moby < 20.10.9

Weakness: CWE-281 · Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:L

References