{"id":"CVE-2021-41089","aliases":["CVE-2021-41089","GHSA-v994-f8vw-g7j4","GO-2024-2913"],"related":["CGA-vg3j-3q98-vg3p"],"kind":"vulnerability","state":"published","title":"`docker cp` allows unexpected chmod of host files","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"## Impact\nA 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.\n\n## Patches\nThis 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.\n\n## Workarounds\nEnsure you only run trusted containers.\n\n## Credits\nThe Moby project would like to thank Lei Wang and Ruizhi Xiao for responsibly disclosing this issue in accordance with the ﻿[Moby security policy](https://github.com/moby/moby/blob/master/SECURITY.md).\n\n## For more information\nIf you have any questions or comments about this advisory:\n\n* [Open an issue](https://github.com/moby/moby/issues/new)\n* Email us at ﻿ security@docker.com ﻿ if you think you’ve found a security bug","format":"markdown","source":"ghsa"},{"lang":"en","text":"Unexpected chmod of host files via 'docker cp' in Moby Docker Engine in github.com/docker/docker","format":"markdown","source":"go"},{"lang":"es","text":"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","source":"nvd"}],"published":"2021-10-04T20:20:15.000Z","modified":"2026-09-10T03:50:15.851Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:C/C:L/I:N/A:N","score":2.8,"rating":"LOW"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:C/C:L/I:N/A:N","score":2.8,"rating":"LOW"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:C/C:L/I:N/A:N","score":2.8,"rating":"LOW"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:L","score":6.3,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:L/AC:M/Au:N/C:P/I:P/A:P","score":4.4,"rating":"MEDIUM"}],"cwes":["CWE-281"],"affected":[{"ranges":[{"version":"< 20.10.9","status":"affected"}],"vendor":"moby","product":"moby","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"20.10.9"}],"ecosystem":"Go","package":"github.com/docker/docker","purl":"pkg:golang/github.com/docker/docker","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"20.10.9+incompatible"}],"ecosystem":"Go","package":"github.com/docker/docker","purl":"pkg:golang/github.com/docker/docker","source":"go"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"20.10.9+incompatible"}],"ecosystem":"Go","package":"github.com/moby/moby","purl":"pkg:golang/github.com/moby/moby","source":"go"},{"ranges":[{"status":"affected","fixed":"20.10.9"}],"vendor":"mobyproject","product":"moby","cpe":"cpe:2.3:a:mobyproject:moby:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"status":"affected","version":"34"},{"status":"affected","version":"35"}],"vendor":"fedoraproject","product":"fedora","cpe":"cpe:2.3:o:fedoraproject:fedora:34:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/moby/moby/security/advisories/GHSA-v994-f8vw-g7j4","tags":["advisory","third-party-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/moby/moby/commit/bce32e5c93be4caf1a592582155b9cb837fc129a","tags":["fix","patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/ZNFADTCHHYWVM6W4NJ6CB4FNFM2VMBIB/","tags":["vendor-advisory","x-refsource-fedora","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/B5Q6G6I4W5COQE25QMC7FJY3I3PAYFBB/","tags":["vendor-advisory","x-refsource-fedora","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://cert-portal.siemens.com/productcert/pdf/ssa-222547.pdf","tags":["web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-41089","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/moby/moby","tags":["package"],"sources":["ghsa"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/B5Q6G6I4W5COQE25QMC7FJY3I3PAYFBB","tags":["web"],"sources":["ghsa"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/ZNFADTCHHYWVM6W4NJ6CB4FNFM2VMBIB","tags":["web"],"sources":["ghsa"]},{"url":"https://pkg.go.dev/vuln/GO-2024-2913","tags":["web"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2021-41089","url":"https://www.cve.org/CVERecord?id=CVE-2021-41089","licence":"CVE Terms of Use","modified":"2024-08-04T02:59:31.512Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-v994-f8vw-g7j4","url":"https://github.com/advisories/GHSA-v994-f8vw-g7j4","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:15.851Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2024-2913","url":"https://pkg.go.dev/vuln/GO-2024-2913","licence":"CC-BY-4.0","modified":"2026-02-04T03:21:51.972Z"},{"source":"nvd","name":"NVD","id":"CVE-2021-41089","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-41089","licence":"Public domain","modified":"2026-06-17T04:07:51.127Z"}],"updatedAt":"2026-11-25T22:58:04.295Z","epss":{"score":0.0029,"percentile":0.23222,"date":"2026-12-01T12:00:22.000Z"}}