CVE-2021-41091
JSON

6.3medium

Insufficiently restricted permissions on data directory in Docker Engine

Severity
6.3medium CVSS:3.1 by GitHub_M
Exploit likelihood
2.85% (higher than 87% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-3fwx-pjgw-3558GO-2024-2500

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

Product or packageVersionsReported by
moby moby< 20.10.9CVE List
github.com/moby/moby (Go)before 20.10.9, before 20.10.9+incompatibleGitHub Advisory Database, Go Vulnerability Database
github.com/docker/docker (Go)before 20.10.9, before 20.10.9+incompatibleGitHub Advisory Database, Go Vulnerability Database
mobyproject mobybefore 20.10.9NVD
fedoraproject fedora34, 35NVD

All scores

GitHub_M6.3medium CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:L
GitHub5.9medium CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L
NVD6.3medium CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:L
NVD4.6medium CVSS:2.0AV:L/AC:L/Au:N/C:P/I:P/A:P

Classification

What each source says

CVE List

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.

GitHub Advisory Database

Impact

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.

Patches

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.

Workarounds

Limit access to the host to trusted users. Limit access to host volumes to trusted containers.

Credits

The Moby project would like to thank Joan Bruguera for responsibly disclosing this issue in accordance with the Moby security policy.

For more information

If you have any questions or comments about this advisory:

Go Vulnerability Database

Moby (Docker Engine) Insufficiently restricted permissions on data directory in github.com/docker/docker

NVD (es)

Moby es un proyecto de código abierto creado por Docker para permitir la contención de software. Se encontró un error en Moby (Docker Engine) en el que el directorio de datos (normalmente "/var/lib/docker") contenía subdirectorios con permisos insuficientemente restringidos, lo que permitía a usuarios de Linux no privilegiados saltar el contenido del directorio y ejecutar programas. Cuando los contenedores incluían programas ejecutables con bits de permiso extendidos (como "setuid"), los usuarios no privilegiados de Linux podían detectar y ejecutar esos programas. Cuando el UID de un usuario de Linux no privilegiados en el host colisionaba con el propietario o el grupo de un archivo dentro de un contenedor, el usuario de Linux no privilegiados en el host podía descubrir, leer y modificar esos archivos. Este bug ha sido corregido en Moby (Docker Engine) versión 20.10.9. Usuarios deberían actualizar a esta versión lo antes posible. Los contenedores en ejecución deben ser detenidos y reiniciados para que los permisos sean corregidos. Para usuarios que no puedan actualizar, limite el acceso al host a usuarios confiables. Limite el acceso a los volúmenes del host a los contenedores confiables

References

https://github.com/moby/moby/security/advisories/GHSA-3fwx-pjgw-3558advisory, third-party-advisory, web
https://github.com/moby/moby/commit/f0ab919f518c47240ea0e72d0999576bb8008e64fix, patch, third-party-advisory, web
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/ZNFADTCHHYWVM6W4NJ6CB4FNFM2VMBIB/vendor-advisory
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/B5Q6G6I4W5COQE25QMC7FJY3I3PAYFBB/vendor-advisory
https://cert-portal.siemens.com/productcert/pdf/ssa-222547.pdfweb
https://nvd.nist.gov/vuln/detail/CVE-2021-41091advisory
https://github.com/moby/mobypackage
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/B5Q6G6I4W5COQE25QMC7FJY3I3PAYFBBweb
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/ZNFADTCHHYWVM6W4NJ6CB4FNFM2VMBIBweb

Related

Sources

SourceRecordLicence
CVE ListCVE-2021-41091 changed 2024-08-04CVE Terms of Use
GitHub Advisory DatabaseGHSA-3fwx-pjgw-3558 changed 2026-09-10CC-BY-4.0
Go Vulnerability DatabaseGO-2024-2500 changed 2026-02-04CC-BY-4.0
NVDCVE-2021-41091 changed 2026-06-17Public domain