---
id: CVE-2021-41089
aliases:
  - GHSA-v994-f8vw-g7j4
  - GO-2024-2913
title: '`docker cp` allows unexpected chmod of host files in Moby Docker Engine'
summary: '`docker cp` allows unexpected chmod of host files in Moby Docker Engine'
severity: low
cvss: 2.8
cvssVector: 'CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:C/C:L/I:N/A:N'
vendor: docker
product: github.com/docker/docker
ecosystem: go
affected:
  - github.com/docker/docker < 20.10.9
patched:
  - github.com/docker/docker 20.10.9
published: '2024-06-10'
updated: '2026-07-08'
source: OSV
sourceUrl: 'https://osv.dev/vulnerability/GHSA-v994-f8vw-g7j4'
references:
  - url: 'https://github.com/moby/moby/security/advisories/GHSA-v994-f8vw-g7j4'
  - url: 'https://nvd.nist.gov/vuln/detail/CVE-2021-41089'
  - url: >-
      https://github.com/moby/moby/commit/bce32e5c93be4caf1a592582155b9cb837fc129a
  - url: 'https://cert-portal.siemens.com/productcert/pdf/ssa-222547.pdf'
  - url: 'https://github.com/moby/moby'
  - url: >-
      https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/B5Q6G6I4W5COQE25QMC7FJY3I3PAYFBB
  - url: >-
      https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/ZNFADTCHHYWVM6W4NJ6CB4FNFM2VMBIB
  - url: 'https://pkg.go.dev/vuln/GO-2024-2913'
tags:
  - osv
  - go
epss: 0.0029
epssPercentile: 0.1926
ingestedAt: '2026-07-09T18:56:36.925Z'
---

## Overview

## 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](https://github.com/moby/moby/blob/master/SECURITY.md).

## For more information
If you have any questions or comments about this advisory:

* [Open an issue](https://github.com/moby/moby/issues/new)
* Email us at ﻿ security@docker.com ﻿ if you think you’ve found a security bug

## Affected packages

- `github.com/docker/docker < 20.10.9`

## Remediation

Upgrade to a patched release:

- `github.com/docker/docker 20.10.9`
