CVE-2026-41568

CVE-2026-41568 is a medium-severity security vulnerability in github.com/docker/docker (go), affecting versions <= 28.5.2. It is fixed in 2.0.0-beta.14.

Summary

A race condition during docker cp mount setup allows a malicious container to create empty files or directories at arbitrary absolute paths on the host filesystem.

This advisory covers the race during mountpoint creation. The related race during the subsequent mount syscall is tracked in GHSA-rg2x-37c3-w2rh

Details

When copying files into a container, the daemon sets up a temporary filesystem view by bind-mounting volumes into a private mount namespace. During this setup, the mount destination path is first resolved within the container's root filesystem using GetResourcePath, and then used to create the mountpoint (file or directory) if it does not already exist via createIfNotExists.

Between path resolution and mountpoint creation, a process running inside the container can swap a path component for a symlink pointing to an arbitrary location on the host. Because createIfNotExists operates on the already-resolved absolute path using standard os.MkdirAll and os.OpenFile, which follow symlinks in intermediate path components, the symlink is followed and the file or directory is created outside the container root filesystem, as root.

Conditions for exploitation

  • A container must be running with a process that can rapidly create and swap symlinks at a volume mount destination path.
  • An operator must initiate a docker cp into that container, or call the PUT /containers/{id}/archive or HEAD /containers/{id}/archive API endpoints.

Not affected

  • Containers that do not have volume mounts are not affected, as the race occurs during volume bind-mount setup.

Workarounds

  • Only run containers from trusted images.
  • Avoid using docker cp with untrusted running containers.
  • Use authorization plugins to restrict access to the archive API endpoints (PUT /containers/{id}/archive, HEAD /containers/{id}/archive).

Impact

A malicious container can create empty files or directories at arbitrary absolute paths on the host filesystem, running as root. This enables persistent denial of service, for example:

  • Converting /etc/docker/daemon.json into a directory prevents the daemon from restarting
  • Creating /etc/nologin prevents user logins
  • Overwriting critical system paths with empty files can break host services

The container does not gain read or write access to existing host files, only the ability to create new empty files or directories at chosen paths.

CVE-2026-41568 has a CVSS score of 6.1 (Medium). The vector is requires local access, low privileges required, and user interaction required. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (2.0.0-beta.14); upgrading removes the vulnerable code path.

Affected versions

github.com/docker/docker (<= 28.5.2) github.com/moby/moby/v2 (< 2.0.0-beta.14) github.com/moby/moby (<= 28.5.2)

Security releases

github.com/moby/moby/v2 → 2.0.0-beta.14 (go)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

See it in your environment

Remediation advice

Mountpoint creation is now scoped to the container root using os.Root (Go 1.24+), which refuses to follow symlinks that escape the opened root directory. All filesystem operations in createIfNotExists (MkdirAll, OpenFile) are performed through the os.Root handle, so even if a symlink swap occurs after path resolution, the creation stays confined to the container root.

Frequently Asked Questions

  1. What is CVE-2026-41568? CVE-2026-41568 is a medium-severity security vulnerability in github.com/docker/docker (go), affecting versions <= 28.5.2. It is fixed in 2.0.0-beta.14.
  2. How severe is CVE-2026-41568? CVE-2026-41568 has a CVSS score of 6.1 (Medium). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
  3. Which packages are affected by CVE-2026-41568?
    • github.com/docker/docker (go) (versions <= 28.5.2)
    • github.com/moby/moby/v2 (go) (versions < 2.0.0-beta.14)
    • github.com/moby/moby (go) (versions <= 28.5.2)
  4. Is there a fix for CVE-2026-41568? Yes. CVE-2026-41568 is fixed in 2.0.0-beta.14. Upgrade to this version or later.
  5. Is CVE-2026-41568 exploitable, and should I be worried? Whether CVE-2026-41568 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  6. What actually determines whether CVE-2026-41568 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  7. How do I fix CVE-2026-41568? Upgrade github.com/moby/moby/v2 to 2.0.0-beta.14 or later.

Other vulnerabilities in github.com/docker/docker

CVE-2026-42306CVE-2026-41567CVE-2026-34040CVE-2026-33997CVE-2025-54410

Stop the waste.
Protect your environment with Kodem.