Cloudanix VulnDB

CVE-2024-29018

Medium · 5.9

CVSS

5.9

EPSS

0.8%

Published

Mar 20, 2024

CISA due date

—

Cloudanix analysis

Monitor only SSVC: Track

A bug in container networking software can let containers that should be cut off from the outside world still send information out by using DNS lookups.

Exploitation
Remote Unauthenticated
Attacker needs
None
Complexity
Moderate
Impact
Data Exposure
Component
Container Runtime
Class
Information Disclosure
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

The flaw causes dockerd to forward DNS requests from containers on internal networks to the host loopback resolver, bypassing network namespace isolation and allowing resolution of external nameservers.

Why it matters to the business

Organizations relying on internal Docker networks for container isolation face increased risk of data exfiltration, potentially exposing sensitive information and requiring urgent patching across containerized environments.

How an attack unfolds

An attacker first gains access to a container attached solely to an internal network, then registers a domain with attacker-controlled authoritative nameservers; DNS queries encoding exfiltrated data are issued from the container, forwarded by dockerd to the host resolver, and ultimately reach the attacker's servers for decoding.

How to fix it

Upgrade Moby to 26.0.0, 25.0.4, or 23.0.11 (or commit 330d777c53fbbf734178d6a35c9dc0a5070ba4ac); as a workaround configure affected containers with a custom upstream DNS address to force resolution within the container namespace.

How to confirm the fix worked

Confirm Moby version meets or exceeds the fixed releases; test by launching a container on an internal network and verifying that external DNS resolution is blocked or routed only through the container namespace.

Typical attack path

  1. Compromise container attached only to an internal network
  2. Register domain and control its authoritative DNS nameservers
  3. Encode sensitive data into crafted DNS query names
  4. Trigger DNS resolutions that dockerd forwards externally
  5. Receive and decode exfiltrated data at attacker-controlled nameservers

How to detect it

Review DNS resolver logs on the host and network flow records for queries originating from internal-network containers; correlate with container network namespace identifiers and look for unusual query volumes or encoded subdomain patterns.

What your security team should do

  • Immediately upgrade all Moby installations to a patched release such as 26.0.0, 25.0.4, or 23.0.11
  • Audit existing internal network definitions and container DNS settings
  • Add network egress controls and DNS monitoring for containers marked internal

The record

Moby is an open source container framework that is a key component of Docker Engine, Docker Desktop, and other distributions of container tooling or runtimes. Moby's networking implementation allows for many networks, each with their own IP address range and gateway, to be defined. This feature is frequently referred to as custom networks, as each network can have a different driver, set of parameters and thus behaviors. When creating a network, the `--internal` flag is used to designate a network as _internal_. The `internal` attribute in a docker-compose.yml file may also be used to mark a network _internal_, and other API clients may specify the `internal` parameter as well. When containers with networking are created, they are assigned unique network interfaces and IP addresses. The host serves as a router for non-internal networks, with a gateway IP that provides SNAT/DNAT to/from container IPs. Containers on an internal network may communicate between each other, but are precluded from communicating with any networks the host has access to (LAN or WAN) as no default route is configured, and firewall rules are set up to drop all outgoing traffic. Communication with the gateway IP address (and thus appropriately configured host services) is possible, and the host may communicate with any container IP directly. In addition to configuring the Linux kernel's various networking features to enable container networking, `dockerd` directly provides some services to container networks. Principal among these is serving as a resolver, enabling service discovery, and resolution of names from an upstream resolver. When a DNS request for a name that does not correspond to a container is received, the request is forwarded to the configured upstream resolver. This request is made from the container's network namespace: the level of access and routing of traffic is the same as if the request was made by the container itself. As a consequence of this design, containers solely attached to an internal network will be unable to resolve names using the upstream resolver, as the container itself is unable to communicate with that nameserver. Only the names of containers also attached to the internal network are able to be resolved. Many systems run a local forwarding DNS resolver. As the host and any containers have separate loopback devices, a consequence of the design described above is that containers are unable to resolve names from the host's configured resolver, as they cannot reach these addresses on the host loopback device. To bridge this gap, and to allow containers to properly resolve names even when a local forwarding resolver is used on a loopback address, `dockerd` detects this scenario and instead forward DNS requests from the host namework namespace. The loopback resolver then forwards the requests to its configured upstream resolvers, as expected. Because `dockerd` forwards DNS requests to the host loopback device, bypassing the container network namespace's normal routing semantics entirely, internal networks can unexpectedly forward DNS requests to an external nameserver. By registering a domain for which they control the authoritative nameservers, an attacker could arrange for a compromised container to exfiltrate data by encoding it in DNS queries that will eventually be answered by their nameservers. Docker Desktop is not affected, as Docker Desktop always runs an internal resolver on a RFC 1918 address. Moby releases 26.0.0, 25.0.4, and 23.0.11 are patched to prevent forwarding any DNS requests from internal networks. As a workaround, run containers intended to be solely attached to internal networks with a custom upstream address, which will force all upstream DNS queries to be resolved from the container's network namespace.

Affected packages

Ecosystem Package Introduced Fixed
Go github.com/docker/docker 0 23.0.11
Go github.com/docker/docker 25.0.0 25.0.5
Go github.com/docker/docker 25.0.0+incompatible 25.0.5+incompatible
Go github.com/docker/docker 26.0.0-rc1 26.0.0-rc3
Chainguard aactl 0 0.4.12-r7
Chainguard buf 0 1.30.1-r0
Chainguard buildctl 0 0.13.1-r1
Chainguard buildkitd 0 0.13.1-r1
Chainguard cadvisor 0 0.49.1-r4
Chainguard cadvisor-compat 0 0.49.1-r4
Chainguard cadvisor-fips 0 0.52.1-r2
Chainguard cilium-cli 0 0.18.2-r2
Chainguard conftest 0 0.50.0-r2
Chainguard conftest-fips 0 0.58.0-r3
Chainguard crossplane 0 1.15.1-r1
Chainguard crossplane-crank 0 1.15.1-r1
Chainguard crossplane-xfn 0 1.15.1-r1
Chainguard ctop 0 0.7.7-r13
Chainguard dagger 0 0.10.2-r1
Chainguard datadog-agent 0 7.52.0-r0
Chainguard datadog-agent-core-integrations 0 7.52.0-r0
Chainguard datadog-agent-core-integrations-fips 0 7.52.0-r0
Chainguard datadog-agent-fakeintake 0 7.52.0-r0
Chainguard datadog-agent-fakeintake-fips 0 7.52.0-r0
Chainguard datadog-agent-fips 0 7.52.0-r0
Chainguard datadog-agent-jmx 0 7.52.0-r0
Chainguard datadog-agent-jmx-fips 0 7.52.0-r0
Chainguard datadog-agent-oci-compat 0 7.52.0-r0
Chainguard datadog-agent-oci-compat-fips 0 7.52.0-r0
Chainguard datadog-agent-s6-overlay 0 7.52.0-r0
Chainguard datadog-agent-s6-overlay-fips 0 7.52.0-r0
Chainguard datadog-cluster-agent 0 7.52.0-r0
Chainguard datadog-cluster-agent-fips 0 7.52.0-r0
Chainguard datadog-cluster-agent-oci-compat 0 7.52.0-r0
Chainguard datadog-cluster-agent-oci-compat-fips 0 7.52.0-r0
Chainguard docker 0 0
Chainguard docker-compose 0 2.25.0-r2
Chainguard docker-config-mirror-gcr 0 0
Chainguard docker-dind 0 0
Chainguard docker-dind-compat 0 0
Chainguard docker-init 0 0
Chainguard docker-modprobe-compat 0 0
Chainguard docker-oci-entrypoint 0 0
Chainguard docker-rootless 0 0
Chainguard dockerd 0 0
Chainguard dockerd-oci-entrypoint 0 0
Chainguard dockerd-service 0 0
Chainguard dogstatsd 0 7.52.0-r0
Chainguard gitlab-rails-ee-17.0 0 17.0.6-r1
Chainguard gitlab-rails-ee-17.3 0 17.3.1-r1
Chainguard gitlab-rails-ee-assets-17.3 0 17.3.1-r1
Chainguard gitlab-rails-ee-assets-fips-17.2 0 17.2.1-r1
Chainguard gitlab-rails-ee-doc-17.3 0 17.3.1-r1
Chainguard gitlab-rails-ee-doc-fips-17.2 0 17.2.1-r1
Chainguard gitlab-rails-ee-fips-17.0 0 17.0.6-r1
Chainguard gitlab-rails-ee-fips-17.2 0 17.2.1-r1
Chainguard goreleaser-1.18 0 1.18.2-r12
Chainguard grype 0 0.74.7-r3
Chainguard kaniko 0 1.21.1-r1
Chainguard kaniko-compat 0 1.21.1-r1
Chainguard kaniko-warmer 0 1.21.1-r1
Chainguard kaniko-warmer-compat 0 1.21.1-r1
Chainguard kargo 0 0.4.4-r2
Chainguard kargo-oci-compat 0 0.4.4-r2
Chainguard ko 0 0.15.2-r4
Chainguard kubescape 0 3.0.7-r1
Chainguard kyverno 0 0
Chainguard kyverno-background-controller 0 0
Chainguard kyverno-cleanup-controller 0 0
Chainguard kyverno-cli 0 0
Chainguard kyverno-init-container 0 0
Chainguard kyverno-reports-controller 0 0
Chainguard logcli 0 3.0.0-r1
Chainguard loki 0 3.0.0-r1
Chainguard loki-2.9 0 2.9.8-r1
Chainguard loki-2.9-logcli 0 2.9.8-r1
Chainguard loki-2.9-loki-canary 0 2.9.8-r1
Chainguard loki-2.9-promtail 0 2.9.8-r1
Chainguard loki-3.1 0 3.1.1-r0
Chainguard loki-3.1-logcli 0 3.1.1-r0
Chainguard loki-3.1-loki-canary 0 3.1.1-r0
Chainguard loki-3.1-promtail 0 3.1.1-r0
Chainguard loki-canary 0 3.0.0-r1
Chainguard melange 0 0.6.9-r4
Chainguard melange-microvm-init 0 0.6.9-r4
Chainguard prometheus 0 2.51.0-r1
Chainguard prometheus-2.50 0 2.50.1-r4
Chainguard prometheus-2.50-bitnami-compat 0 2.50.1-r4
Chainguard prometheus-2.51 0 2.51.0-r1
Chainguard prometheus-2.51-bitnami-compat 0 2.51.0-r1
Chainguard prometheus-bitnami-compat 0 2.51.0-r1
Chainguard prometheus-fips 0 2.51.0-r1
Chainguard promtail 0 3.0.0-r1
Chainguard py3-docker 0 0
Chainguard py3-supported-docker 0 0
Chainguard py3.10-docker 0 0
Chainguard py3.11-docker 0 0
Chainguard py3.12-docker 0 0
Chainguard py3.13-docker 0 0
Chainguard rancher-2.10 0 0
Chainguard rancher-2.11 0 0
Chainguard rancher-agent-2.10 0 0
Chainguard rancher-agent-2.11 0 0
Chainguard rancher-charts-2.8 0 0_git20251028-r0
Chainguard rancher-kontainer-driver-metadata-2.8 0 0_git20251028-r0
Chainguard rancher-system-charts-2.8 0 0_git20251028-r0
Chainguard spire-agent 0 1.9.1-r4
Chainguard spire-agent-fips 0 1.9.0-r4
Chainguard spire-oidc-discovery-provider 0 1.9.1-r4
Chainguard spire-oidc-discovery-provider-fips 0 1.9.0-r4
Chainguard spire-server 0 1.9.1-r4
Chainguard spire-server-fips 0 1.9.0-r4
Chainguard syft 0 1.1.0-r0
Chainguard telegraf-1.26 0 1.26.3-r15
Chainguard telegraf-1.29 0 1.29.5-r5
Chainguard telegraf-1.30 0 1.30.0-r4
Chainguard tkn 0 0.36.0-r2
Chainguard traefik-fips 0 2.11.0-r0
Chainguard trivy 0 0.50.0-r1
Chainguard up 0 0.26.0-r1
Chainguard wolfictl 0 0.15.7-r1
Chainguard zot 0 2.0.3-r0
Debian:11 docker.io 0 No fix
Debian:12 docker.io 0 No fix
Debian:13 docker.io 0 No fix
Mageia:9 docker 0 25.0.7-1.mga9
SUSE:Enterprise Storage 7.1 docker 0 27.5.1_ce-150000.218.1
SUSE:Enterprise Storage 7.1 docker-stable 0 24.0.9_ce-150000.1.15.1
SUSE:Enterprise Storage 7.1 docker-stable 0 24.0.9_ce-150000.1.25.1
SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS docker 0 27.5.1_ce-150000.218.1
SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS docker-stable 0 24.0.9_ce-150000.1.15.1
SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS docker-stable 0 24.0.9_ce-150000.1.25.1
SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOS docker 0 27.5.1_ce-150000.218.1
SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOS docker-stable 0 24.0.9_ce-150000.1.15.1
SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOS docker-stable 0 24.0.9_ce-150000.1.25.1
SUSE:Linux Enterprise High Performance Computing 15 SP4-LTSS docker 0 27.5.1_ce-150000.218.1
SUSE:Linux Enterprise High Performance Computing 15 SP4-LTSS docker-stable 0 24.0.9_ce-150000.1.15.1
SUSE:Linux Enterprise High Performance Computing 15 SP4-LTSS docker-stable 0 24.0.9_ce-150000.1.25.1
SUSE:Linux Enterprise High Performance Computing 15 SP5-ESPOS docker 0 27.5.1_ce-150000.218.1
SUSE:Linux Enterprise High Performance Computing 15 SP5-ESPOS docker-stable 0 24.0.9_ce-150000.1.15.1
SUSE:Linux Enterprise High Performance Computing 15 SP5-ESPOS docker-stable 0 24.0.9_ce-150000.1.25.1
SUSE:Linux Enterprise High Performance Computing 15 SP5-LTSS docker 0 27.5.1_ce-150000.218.1
SUSE:Linux Enterprise High Performance Computing 15 SP5-LTSS docker-stable 0 24.0.9_ce-150000.1.15.1
SUSE:Linux Enterprise High Performance Computing 15 SP5-LTSS docker-stable 0 24.0.9_ce-150000.1.25.1
SUSE:Linux Enterprise Micro 5.1 docker 0 27.5.1_ce-150000.215.3
SUSE:Linux Enterprise Micro 5.1 docker 0 27.5.1_ce-150000.218.1
SUSE:Linux Enterprise Micro 5.2 docker 0 27.5.1_ce-150000.215.3
SUSE:Linux Enterprise Micro 5.2 docker 0 27.5.1_ce-150000.218.1
SUSE:Linux Enterprise Micro 5.3 docker 0 27.5.1_ce-150000.215.3
SUSE:Linux Enterprise Micro 5.3 docker 0 27.5.1_ce-150000.218.1
SUSE:Linux Enterprise Micro 5.4 docker 0 27.5.1_ce-150000.215.3
SUSE:Linux Enterprise Micro 5.4 docker 0 27.5.1_ce-150000.218.1
SUSE:Linux Enterprise Micro 5.5 docker 0 27.5.1_ce-150000.215.3
SUSE:Linux Enterprise Micro 5.5 docker 0 27.5.1_ce-150000.218.1
SUSE:Linux Enterprise Module for Containers 15 SP6 docker 0 27.5.1_ce-150000.215.3
SUSE:Linux Enterprise Module for Containers 15 SP6 docker 0 27.5.1_ce-150000.218.1
SUSE:Linux Enterprise Module for Containers 15 SP6 docker-stable 0 24.0.9_ce-150000.1.11.1
SUSE:Linux Enterprise Module for Containers 15 SP6 docker-stable 0 24.0.9_ce-150000.1.15.1
SUSE:Linux Enterprise Module for Containers 15 SP6 docker-stable 0 24.0.9_ce-150000.1.25.1
SUSE:Linux Enterprise Module for Containers 15 SP7 docker-stable 0 24.0.9_ce-150000.1.39.1
SUSE:Linux Enterprise Module for Containers 15 SP7 docker-stable 0 24.0.9_ce-150000.1.25.1
SUSE:Linux Enterprise Server 12 SP5-LTSS docker 0 27.5.1_ce-98.126.1
SUSE:Linux Enterprise Server 12 SP5-LTSS docker-stable 0 24.0.9_ce-1.20.1
SUSE:Linux Enterprise Server 12 SP5-LTSS docker-stable 0 24.0.9_ce-1.11.1
SUSE:Linux Enterprise Server 15 SP3-LTSS docker 0 27.5.1_ce-150000.218.1
SUSE:Linux Enterprise Server 15 SP3-LTSS docker-stable 0 24.0.9_ce-150000.1.15.1
SUSE:Linux Enterprise Server 15 SP3-LTSS docker-stable 0 24.0.9_ce-150000.1.25.1
SUSE:Linux Enterprise Server 15 SP4-LTSS docker 0 27.5.1_ce-150000.218.1
SUSE:Linux Enterprise Server 15 SP4-LTSS docker-stable 0 24.0.9_ce-150000.1.15.1
SUSE:Linux Enterprise Server 15 SP4-LTSS docker-stable 0 24.0.9_ce-150000.1.25.1
SUSE:Linux Enterprise Server 15 SP5-LTSS docker 0 27.5.1_ce-150000.218.1
SUSE:Linux Enterprise Server 15 SP5-LTSS docker-stable 0 24.0.9_ce-150000.1.15.1
SUSE:Linux Enterprise Server 15 SP5-LTSS docker-stable 0 24.0.9_ce-150000.1.25.1
SUSE:Linux Enterprise Server LTSS Extended Security 12 SP5 docker 0 27.5.1_ce-98.123.1
SUSE:Linux Enterprise Server LTSS Extended Security 12 SP5 docker 0 27.5.1_ce-98.126.1
SUSE:Linux Enterprise Server LTSS Extended Security 12 SP5 docker-stable 0 24.0.9_ce-1.20.1
SUSE:Linux Enterprise Server LTSS Extended Security 12 SP5 docker-stable 0 24.0.9_ce-1.11.1
SUSE:Linux Enterprise Server for SAP Applications 15 SP3 docker 0 27.5.1_ce-150000.218.1
SUSE:Linux Enterprise Server for SAP Applications 15 SP3 docker-stable 0 24.0.9_ce-150000.1.15.1
SUSE:Linux Enterprise Server for SAP Applications 15 SP3 docker-stable 0 24.0.9_ce-150000.1.25.1
SUSE:Linux Enterprise Server for SAP Applications 15 SP4 docker 0 27.5.1_ce-150000.218.1
SUSE:Linux Enterprise Server for SAP Applications 15 SP4 docker-stable 0 24.0.9_ce-150000.1.15.1
SUSE:Linux Enterprise Server for SAP Applications 15 SP4 docker-stable 0 24.0.9_ce-150000.1.25.1
SUSE:Linux Enterprise Server for SAP Applications 15 SP5 docker 0 27.5.1_ce-150000.218.1
SUSE:Linux Enterprise Server for SAP Applications 15 SP5 docker-stable 0 24.0.9_ce-150000.1.15.1
SUSE:Linux Enterprise Server for SAP Applications 15 SP5 docker-stable 0 24.0.9_ce-150000.1.25.1
Ubuntu:20.04:LTS docker.io 0 No fix
Ubuntu:20.04:LTS docker.io-app 0 No fix
Ubuntu:22.04:LTS docker.io 0 No fix
Ubuntu:22.04:LTS docker.io-app 0 No fix
Ubuntu:22.04:LTS docker.io-app 0 27.5.1-0ubuntu3~22.04.2
Ubuntu:24.04:LTS docker.io 0 No fix
Ubuntu:24.04:LTS docker.io-app 0 No fix
Ubuntu:24.04:LTS docker.io-app 0 27.5.1-0ubuntu3~24.04.2
Ubuntu:24.10 docker.io 0 No fix
Ubuntu:24.10 docker.io-app 0 No fix
Ubuntu:24.10 docker.io-app 0 26.1.3-0ubuntu1.1
Ubuntu:Pro:16.04:LTS docker.io 0 No fix
Ubuntu:Pro:16.04:LTS docker.io 0 18.09.7-0ubuntu1~16.04.9+esm2
Ubuntu:Pro:18.04:LTS docker.io 0 No fix

Related vulnerabilities