2.8low
`docker cp` allows unexpected chmod of host files
- Severity
- 2.8low CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.29% (higher than 23% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-v994-f8vw-g7j4GO-2024-2913
Description
Moby is an open-source project created by Docker to enable software containerization. A bug was found in Moby (Docker Engine) where attempting to copy files using `docker cp` into a specially-crafted container can result in Unix file permission changes for existing files in the host’s filesystem, widening access to others. This bug does not directly allow files to be read, modified, or executed without an additional cooperating process. This bug has been fixed in Moby (Docker Engine) 20.10.9. Users should update to this version as soon as possible. Running containers do not need to be restarted.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| moby moby | < 20.10.9 | CVE List |
| github.com/docker/docker (Go) | before 20.10.9, before 20.10.9+incompatible | GitHub Advisory Database, Go Vulnerability Database |
| github.com/moby/moby (Go) | before 20.10.9+incompatible | Go Vulnerability Database |
| mobyproject moby | before 20.10.9 | NVD |
| fedoraproject fedora | 34, 35 | NVD |
All scores
| GitHub_M | 2.8low CVSS:3.1 | CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:C/C:L/I:N/A:N |
| GitHub | 2.8low CVSS:3.1 | CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:C/C:L/I:N/A:N |
| NVD | 6.3medium CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:L |
| NVD | 4.4medium CVSS:2.0 | AV:L/AC:M/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 attempting to copy files using `docker cp` into a specially-crafted container can result in Unix file permission changes for existing files in the host’s filesystem, widening access to others. This bug does not directly allow files to be read, modified, or executed without an additional cooperating process. This bug has been fixed in Moby (Docker Engine) 20.10.9. Users should update to this version as soon as possible. Running containers do not need to be restarted.
GitHub Advisory Database
Impact
A bug was found in Moby (Docker Engine) where attempting to copy files using docker cp into a specially-crafted container can result in Unix file permission changes for existing files in the host’s filesystem, widening access to others. This bug does not directly allow files to be read, modified, or executed without an additional cooperating process.
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 do not need to be restarted.
Workarounds
Ensure you only run trusted containers.
Credits
The Moby project would like to thank Lei Wang and Ruizhi Xiao 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:
- Open an issue
- Email us at security@docker.com if you think you’ve found a security bug
Go Vulnerability Database
Unexpected chmod of host files via 'docker cp' in Moby Docker Engine in github.com/docker/docker
NVD (es)
Moby es un proyecto de código abierto creado por Docker para permitir la contenedorización de software. Se ha encontrado un fallo en Moby (Docker Engine) en el que el intento de copiar archivos mediante `docker cp` en un contenedor especialmente diseñado puede dar lugar a cambios en los permisos de archivos Unix para los archivos existentes en el sistema de archivos del host, ampliando el acceso a otros. Este fallo no permite directamente la lectura, modificación o ejecución de archivos sin un proceso adicional que coopere. Este error ha sido corregido en Moby (Docker Engine) 20.10.9. Los usuarios deben actualizar a esta versión lo antes posible. Los contenedores en ejecución no necesitan ser reiniciados
References
Related
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2021-41089 changed 2024-08-04 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-v994-f8vw-g7j4 changed 2026-09-10 | CC-BY-4.0 |
| Go Vulnerability Database | GO-2024-2913 changed 2026-02-04 | CC-BY-4.0 |
| NVD | CVE-2021-41089 changed 2026-06-17 | Public domain |