VYPR
Moderate severityNVD Advisory· Published Mar 20, 2024· Updated Aug 13, 2024

External DNS requests from 'internal' networks could lead to data exfiltration

CVE-2024-29018

Description

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.

AI Insight

LLM-synthesized narrative grounded in this CVE's description and references.

Moby's internal network DNS forwarding can leak data to upstream resolvers; patched to return REFUSED.

Vulnerability

The Moby container framework's embedded DNS resolver forwards queries for non-container names to upstream resolvers, even when the request originates from a container on an internal network. This behavior contradicts the expectation that internal networks should be isolated from external networks [1].

Exploitation

An attacker with the ability to trigger a DNS lookup from a container attached to an internal network can cause the request to be sent to the configured upstream resolver. This can lead to data exfiltration, as the DNS query itself (including the queried name) may reveal sensitive information such as internal service names or application logic [1].

Impact

The vulnerability enables information disclosure through DNS requests. An attacker on an internal network can observe the responses or simply the fact that a query was made, potentially revealing internal network structure or hostnames [1].

Mitigation

The issue is fixed in pull request #46609, where the embedded DNS resolver now returns a REFUSED response with the Recursion Available bit unset for internal networks, preventing forwarding to upstream resolvers [3]. Users should update their Moby/Docker installation to include this fix.

AI Insight generated on May 20, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.

Affected packages

Versions sourced from the GitHub Security Advisory.

PackageAffected versionsPatched versions
github.com/docker/dockerGo
>= 26.0.0-rc1, < 26.0.0-rc326.0.0-rc3
github.com/docker/dockerGo
>= 25.0.0, < 25.0.525.0.5
github.com/docker/dockerGo
< 23.0.1123.0.11

Affected products

251

Patches

0

No patches discovered yet.

Vulnerability mechanics

AI mechanics synthesis has not run for this CVE yet.

References

3

News mentions

0

No linked articles in our index yet.