CVE-2021-21284: privilege escalation in Moby
Noroxi assessment
Priority: Monitor (action score 27/100)
- The sources we track (CISA KEV, Exploit-DB, Metasploit, Nuclei, GitHub) show no public exploit code or exploitation in the wild.
- Probability of exploitation in the next 30 days: 1% (FIRST EPSS); higher than 65.4% of all records.
- Someone on the same network segment can trigger it. A low-privileged account is enough. No user action is required. No special conditions are required; it is repeatable.
- Fixed version: docker (Alpine:v3.12) 20.10.3-r0; docker.io (Debian:10) 18.09.1+dfsg1-7.1+deb10u3; docker.io (Debian:12) 20.10.3+dfsg1-1.
- Mentioned 3 times in Turkish national cyber security advisories (siberguvenlik.gov.tr).
Low priority for now. Upgrade to docker (Alpine:v3.12) 20.10.3-r0; docker.io (Debian:10) 18.09.1+dfsg1-7.1+deb10u3; docker.io (Debian:12) 20.10.3+dfsg1-1 or later.
Generated automatically from the record's data: CVSS (NVD and CNA), CISA KEV and SSVC, FIRST EPSS, exploit sources, fixed versions. How we calculate it
Primary sources: NVD · CVE.org · FIRST EPSS
In Docker before versions 9.03.15, 20.10.3 there is a vulnerability involving the --userns-remap option in which access to remapped root allows privilege escalation to real root. When using "--userns-remap", if the root user in the remapped namespace has access to the host filesystem they can modify files under "/var/lib/docker/<remapping>" that cause writing files with extended privileges. Versions 20.10.3 and 19.03.15 contain patches that prevent privilege escalation from remapped user.
- Published
- Feb 2, 2021
- Updated
- Jun 16, 2026
- EPSS
- 1.0% · 65th percentile
- CWE
- CWE-22
Report tools
Action score
27
Low priority for now.
- CVSS
- 27 / 40 · 6.8 / 10
- CISA KEV
- 0 / 30 · Not listed
- EPSS
- 0 / 30 · 1.0%
CNA vs NVD score
- NVD
- 6.8
- CNA · GitHub_M
- 6.8
- agree
The score given by the assigning authority versus NVD’s independent score. A gap means the severity is contested.
Get told when this record changes
- Not in KEV: no record of exploitation in the wild
- No public exploit code on record
- A fix has been released
If any of these changes, we'll tell you in the daily email digest.
Is your version affected? Check itNoroxi analysis
What does it mean in your environment?
The assessment above is generated automatically from the record's data; it doesn't know your environment. Our team verifies on your systems whether this vulnerability is actually exploitable and which mitigation is enough.
We use this product, ask for helpAffected systems
Is your version affected?
Pick the product and type the version you run. It's compared with this record's version ranges in your browser; the version isn't sent anywhere.
| Vendor | Product | CPE |
|---|---|---|
| docker | docker | cpe:2.3:a:docker:docker |
| debian | debian linux | cpe:2.3:o:debian:debian_linux |
| netapp | e-series santricity os controller | cpe:2.3:a:netapp:e-series_santricity_os_controller |
Using docker? Add it to your stack and be the first to know about CVEs like this one. (Docker)
Versions reported by the vendor
Affected version ranges reported by the assigning authority (GitHub_M). Independent of NVD's CPE analysis and usually ahead of it.
moby moby
- < 19.03.15, >= 20.0.0, < 20.10.3affected
Affected versions
NVD version ranges (for catalog products). Add the product to your stack with a version and matching uses these.
- docker dockerbefore 19.03.15
- docker docker20.0.0 and later · before 20.10.3
Package-level exposure
OSV and GitHub Advisory data: ecosystem, package and range. SBOM matching uses this table.
| Ecosystem | Package | Affected range | Fix |
|---|---|---|---|
| Alpine:v3.12 | docker | from 20.0.0 · before 20.10.3-r0 | 20.10.3-r0 |
| Debian:10 | docker.io | before 18.09.1+dfsg1-7.1+deb10u3 | 18.09.1+dfsg1-7.1+deb10u3 |
| Debian:12 | docker.io | before 20.10.3+dfsg1-1 | 20.10.3+dfsg1-1 |
| Go | github.com/moby/moby | from 20.10.0-beta1 · before 20.10.3 | 20.10.3 |
| Go | github.com/moby/moby | before 19.3.15 | 19.3.15 |
| openSUSE:Leap 15.2 | containerd | before 1.4.4-lp152.2.6.1 | 1.4.4-lp152.2.6.1 |
| openSUSE:Leap 15.2 | containerd | before 1.3.9-lp152.2.3.1 | 1.3.9-lp152.2.3.1 |
| openSUSE:Leap 15.2 | docker | before 19.03.15_ce-lp152.2.3.1 | 19.03.15_ce-lp152.2.3.1 |
| openSUSE:Leap 15.2 | docker | before 20.10.6_ce-lp152.2.12.1 | 20.10.6_ce-lp152.2.12.1 |
| openSUSE:Leap 15.2 | docker-runc | before 1.0.0rc10+gitr3981_dc9208a3303f-lp152.2.3.1 | 1.0.0rc10+gitr3981_dc9208a3303f-lp152.2.3.1 |
| openSUSE:Leap 15.2 | fish | before 2.7.1-lp152.5.3.1 | 2.7.1-lp152.5.3.1 |
| openSUSE:Leap 15.2 | golang-github-docker-libnetwork | before 0.7.0.1+gitr2908_55e924b8a842-lp152.2.3.1 | 0.7.0.1+gitr2908_55e924b8a842-lp152.2.3.1 |
| openSUSE:Leap 15.2 | runc | before 1.0.0~rc93-lp152.2.3.1 | 1.0.0~rc93-lp152.2.3.1 |
| openSUSE:Leap 15.3 | containerd | before 1.4.4-5.32.1 | 1.4.4-5.32.1 |
| openSUSE:Leap 15.3 | docker | before 20.10.6_ce-6.49.3 | 20.10.6_ce-6.49.3 |
| openSUSE:Leap 15.3 | runc | before 1.0.0~rc93-1.14.2 | 1.0.0~rc93-1.14.2 |
| openSUSE:Tumbleweed | docker | before 20.10.6_ce-2.1 | 20.10.6_ce-2.1 |
| SUSE:Linux Enterprise Module for Containers 12 | containerd | before 1.3.9-16.35.1 | 1.3.9-16.35.1 |
| SUSE:Linux Enterprise Module for Containers 12 | containerd | before 1.4.4-16.38.1 | 1.4.4-16.38.1 |
| SUSE:Linux Enterprise Module for Containers 12 | docker | before 19.03.15_ce-98.60.2 | 19.03.15_ce-98.60.2 |
| SUSE:Linux Enterprise Module for Containers 12 | docker | before 20.10.6_ce-98.66.1 | 20.10.6_ce-98.66.1 |
| SUSE:Linux Enterprise Module for Containers 12 | docker-runc | before 1.0.0rc10+gitr3981_dc9208a3303f-1.52.1 | 1.0.0rc10+gitr3981_dc9208a3303f-1.52.1 |
| SUSE:Linux Enterprise Module for Containers 12 | golang-github-docker-libnetwork | before 0.7.0.1+gitr2908_55e924b8a842-37.1 | 0.7.0.1+gitr2908_55e924b8a842-37.1 |
| SUSE:Linux Enterprise Module for Containers 12 | runc | before 1.0.0~rc93-16.8.1 | 1.0.0~rc93-16.8.1 |
+7
Same product
docker: all recordsOther highest-scoring records for the same primary product.
- CVE-2019-15752Docker Desktop Community Edition before 2.1.0.1 allows local users to gain privileges by placing a Trojan horse…KEV76This week
- CVE-2019-5736runc through 1.0-rc6, as used in Docker before 18.09.2 and other products, allows attackers to overwrite the host runc binary (and…64This week
- CVE-2019-14271In Docker 19.03.x before 19.03.1 linked against the GNU C Library (aka glibc), code injection can occur when the nsswitch facility…45Plan
Published before and after this one in the same product
- ← EarlierCVE-2020-27534Dec 30, 2020 · util/binfmt_misc/check.go in Builder in Docker Engine before 19.03.9 calls os.OpenFile with a potentially unsafe qemu-check temporary…22Monitor
- ← EarlierCVE-2021-3162Jan 15, 2021 · Docker Desktop Community before 2.5.0.0 on macOS mishandles certificate checking, leading to local privilege escalation.31Monitor
- Later →CVE-2021-21285Feb 2, 2021 · Docker daemon crash during image pull of malicious image27Monitor
Remediation
Which version to upgrade to
Fix versions compiled from the vendor, package registries and Microsoft. Verify the vendor's note before upgrading.
| Product / package | Fixed version | Source |
|---|---|---|
| alpine:docker | 20.10.3-r0 · Alpine:v3.12 | Package registry (OSV) |
| debian:docker.io | 20.10.3+dfsg1-1 · Debian:12 | Package registry (OSV) |
| Go:github.com/moby/moby | 19.3.15 | Package registry (OSV) |
| Go:github.com/moby/moby | 20.10.3 | Package registry (OSV) |
| opensuse:containerd | 1.3.9-lp152.2.3.1 · openSUSE:Leap 15.2 | Package registry (OSV) |
| opensuse:docker | 19.03.15_ce-lp152.2.3.1 · openSUSE:Leap 15.2 | Package registry (OSV) |
| opensuse:docker-runc | 1.0.0rc10+gitr3981_dc9208a3303f-lp152.2.3.1 · openSUSE:Leap 15.2 | Package registry (OSV) |
| opensuse:fish | 2.7.1-lp152.5.3.1 · openSUSE:Leap 15.2 | Package registry (OSV) |
| opensuse:golang-github-docker-libnetwork | 0.7.0.1+gitr2908_55e924b8a842-lp152.2.3.1 · openSUSE:Leap 15.2 | Package registry (OSV) |
| opensuse:runc | 1.0.0~rc93-lp152.2.3.1 · openSUSE:Leap 15.2 | Package registry (OSV) |
| suse:containerd | 1.3.9-5.29.3 · SUSE:Linux Enterprise Module for Containers 15 SP2 | Package registry (OSV) |
| suse:docker | 19.03.15_ce-6.43.3 · SUSE:Linux Enterprise Module for Containers 15 SP2 | Package registry (OSV) |
| suse:docker-runc | 1.0.0rc10+gitr3981_dc9208a3303f-6.45.3 · SUSE:Linux Enterprise Module for Containers 15 SP2 | Package registry (OSV) |
| suse:golang-github-docker-libnetwork | 0.7.0.1+gitr2908_55e924b8a842-4.28.3 · SUSE:Linux Enterprise Module for Containers 15 SP2 | Package registry (OSV) |
| suse:runc | 1.0.0~rc93-16.8.1 · SUSE:Linux Enterprise Module for Containers 12 | Package registry (OSV) |
Exploit status
No known public exploit
No public exploit has been observed yet. That doesn't mean you're safe, only that the bar is a little higher.
Research context
For pentesters and researchers: attack profile, score disagreement, timeline, patch commits, credits, variant and chain candidates, bug bounty scope. All derived from existing data; no exploit code.
Timeline
From publication to today: proof of concept, Metasploit module, CISA KEV and fix record. Dates are as reported by the sources.
No dated events beyond publication.
Patch and commit links
Commit, PR and diff links among the references. A starting point for patch-diffing and variant hunting; fixes, not exploits.
Bug bounty scope
The product’s vendor appears in a public program. Matched by name; verify the scope text in the program.
National notice (Türkiye Cybersecurity Directorate / USOM)
Official security notices citing this record; remediation advice is on the agency's page.
- TR-21-0448 · Jun 7, 2021(IBM Güvenlik Bülteni Yayınladı)
- TR-21-0216 · Mar 10, 2021(IBM Güvenlik Bülteni Yayınladı)
- TR-21-0097 · Feb 3, 2021(Docker Güvenlik Zafiyeti)
Not on record for this CVE: EPSS history · researcher credit · variant or chain candidate.
Technical details
Attack conditions
- Someone on the same network segment can trigger it.
- A low-privileged account is enough.
- No user action is required.
- No special conditions are required; it is repeatable.
If successful
- Confidentiality
- none
- Integrity
- high · data or configuration can be modified
- Availability
- none
Impact can extend beyond the vulnerable component (scope changes).
- Attack vector
- Adjacent
- Attack complexity
- Low
- Privileges required
- Low
- User interaction
- None
- Scope
- Changed
- Confidentiality impact
- None
- Integrity impact
- High
- Availability impact
- None
Weakness class (CWE)
CWE-22 · Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')CVSS vector
CVSS:3.1/AV:A/AC:L/PR:L/UI:N/S:C/C:N/I:H/A:N
nvd-primary
Root cause
A user-supplied file name is joined with the allowed directory, but the result is never checked to confirm it is still inside that directory.
The bug in code
The whole CWE-22 classA representative example of this vulnerability class. Not the vendor's source code; it shows the faulty pattern and its fix.
Vulnerable
const file = path.join(ROOT, req.query.name);
res.sendFile(file);Fixed
const file = path.resolve(ROOT, req.query.name);
if (!file.startsWith(ROOT + path.sep)) {
return res.sendStatus(400);
}
res.sendFile(file);Attack context
MITRE CAPEC attack patterns and ATT&CK techniques for this weakness class (CWE). A starting point for detection rules and threat hunting.
Attack patterns (CAPEC)
- Path TraversalCAPEC-126likelihood: High · Very High
- Using Slashes and URL Encoding Combined to Bypass Validation LogicCAPEC-64likelihood: High · High
- Manipulating Web Input to File System CallsCAPEC-76likelihood: High · Very High
- Using Escaped Slashes in Alternate EncodingCAPEC-78likelihood: High · High
- Using Slashes in Alternate EncodingCAPEC-79likelihood: High · High
ATT&CK techniques
—
Change log (1)
- Fix✗ → ✓
For records you follow, these changes also arrive as notifications. →
References
Show all references (7 more)Show less
- github.com/moby/moby/commit/64bd4485b3a66a597c02c95f5776395e540b2c7c
- github.com/moby/moby/releases/tag/v19.03.15
- github.com/moby/moby/releases/tag/v20.10.3
- github.com/moby/moby/security/advisories/GHSA-7452-xqpj-6rpc
- security.gentoo.org/glsa/202107-23
- security.netapp.com/advisory/ntap-20210226-0005/
- www.debian.org/security/2021/dsa-4865
Vendor advisories and official records. Exploit/PoC links are deliberately left out.