CVE-2021-41089
`docker cp` allows unexpected chmod of host files
Also known as GHSA-v994-f8vw-g7j4, GO-2024-2913
Mitigation
- Upgrade github.com/docker/docker to one of 20.10.9, 20.10.9+incompatible (or later in the same release line).
- Upgrade github.com/moby/moby to 20.10.9+incompatible or later.
Who should check
- Projects that depend on Go package github.com/docker/docker (< 20.10.9)
- Projects that depend on Go package github.com/moby/moby (< 20.10.9+incompatible)
- Anyone running moby < 20.10.9
Vulnerability facts
- Affected
- github.com/docker/docker < 20.10.9; github.com/moby/moby < 20.10.9+incompatible
- Fixed in
- 20.10.9, 20.10.9+incompatible
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Not remotely exploitable (local or adjacent access needed)
- CVSS
- 2.8 (v3.1, CNA)CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:C/C:L/I:N/A:NOpen in CVSS calculator
Show all 8 CVSS metrics
- Attack vector: Local
- Attack complexity: High
- Privileges required: Low
- User interaction: None
- Scope: Changed (impact reaches other components)
- Confidentiality impact: Low
- Integrity impact: None
- Availability impact: None
- EPSS
- 0.29% chance of exploitation in 30 days (percentile 14, 2026-11-26)
- CWE
- CWE-281
- Modified
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 and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| Go github.com/docker/docker | < 20.10.9 | 20.10.9, 20.10.9+incompatible | osv |
| Go github.com/moby/moby | < 20.10.9+incompatible | 20.10.9+incompatible | osv |
| moby | < 20.10.9 | — | cvelist |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2021-41089. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2021-41089.md Affected: github.com/docker/docker < 20.10.9; github.com/moby/moby < 20.10.9+incompatible Fixed in: 20.10.9, 20.10.9+incompatible Steps: 1. Search this machine and project for github.com/docker/docker (Go), github.com/moby/moby (Go), moby: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
Vendor advisories
- https://github.com/moby/moby/security/advisories/GHSA-v994-f8vw-g7j4
- 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://nvd.nist.gov/vuln/detail/CVE-2021-41089
Other
- https://cert-portal.siemens.com/productcert/pdf/ssa-222547.pdf
- https://github.com/moby/moby
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/B5Q6G6I4W5COQE25QMC7FJY3I3PAYFBB
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/ZNFADTCHHYWVM6W4NJ6CB4FNFM2VMBIB
- https://pkg.go.dev/vuln/GO-2024-2913
FAQ
Is CVE-2021-41089 being exploited?
There is no confirmed exploitation: CVE-2021-41089 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.29% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2021-41089?
Low: CVSS 2.8 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed). The attack needs conditions outside the attacker's control, which makes it harder.
Which versions are affected by CVE-2021-41089?
github.com/docker/docker < 20.10.9; github.com/moby/moby < 20.10.9+incompatible.
Is there a fix for CVE-2021-41089?
Yes. Fixed in 20.10.9, 20.10.9+incompatible. Upgrade github.com/docker/docker to one of 20.10.9, 20.10.9+incompatible (or later in the same release line). Upgrade github.com/moby/moby to 20.10.9+incompatible or later.
How do I check if I'm affected by CVE-2021-41089?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.