CVE-2024-29018
External DNS requests from 'internal' networks could lead to data exfiltration
Reported by github_m · Published March 20, 2024
github.com/docker/docker is fixed in 26.0.0-rc3+incompatible, 26.0.0-rc3, 25.0.5+incompatible and 2 more (Go Modules)
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.
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| github.com/docker/docker | Go Modules | 26.0.0-rc3+incompatible, 26.0.0-rc3, 25.0.5+incompatible, 25.0.5, 23.0.11 |
| trivy | Wolfi | 0.50.0-r1 |
| ctop | Chainguard | 0.7.7-r13 |
| docker-compose | Chainguard | 2.25.0-r2 |
| up | Wolfi | 0.26.0-r1 |
| buildkitd | Wolfi | 0.13.1-r1 |
| prometheus-2.51 | Wolfi | 2.51.0-r1 |
| gitlab-rails-ee-fips-17.2 | Chainguard | 17.2.1-r1 |
| grype | Chainguard | 0.74.7-r3 |
| goreleaser-1.18 | Chainguard | 1.18.2-r12 |
| zot | Wolfi | 2.0.3-r0 |
| spire-server | Chainguard | 1.9.1-r4 |
62 more packages have a fixed version. See every fix in Lookup.
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| moby | moby | >= 26.0.0-rc1, < 26.0.0-rc3, >= 25.0.0, < 25.0.5, < 23.0.11 |
| wolfi | trivy | 0 |
| chainguard | ctop | 0 |
| chainguard | docker-compose | 0 |
| wolfi | up | 0 |
| wolfi | docker | * |
| wolfi | buildkitd | 0 |
| wolfi | prometheus-2.51 | 0 |
| chainguard | gitlab-rails-ee-fips-17.2 | 0 |
| chainguard | grype | 0 |
| chainguard | goreleaser-1.18 | 0 |
| chainguard | rancher-2.11 | * |
| wolfi | zot | 0 |
| github.com | docker/docker | 0, 26.0.0-rc1, 25.0.0 |
| chainguard | spire-server | 0 |
| wolfi | grype | 0 |
| wolfi | aactl | 0 |
| wolfi | conftest | 0 |
| chainguard | cilium-cli | 0 |
| chainguard | cadvisor | 0 |
…and 77 more
Timeline
- Mar 20, 2024 CVE Published
- Mar 21, 2024 EPSS Score (30 in total, the first dated here)
- Oct 4, 2024 Coalition ESS Score (7 in total, the first dated here)
- Jan 14, 2026 Security Advisory (10 in total, the first dated here)
- Oct 20, 2026 Distribution Patch (5 in total, the first dated here)
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2024-29018
vulnetix vdb fixes CVE-2024-29018
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2024-29018/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart
References
- https://github.com/moby/moby/security/advisories/GHSA-mq39-4gv4-mvpx x_refsource_CONFIRM
- https://github.com/moby/moby/pull/46609 x_refsource_MISC
- https://nvd.nist.gov/vuln/detail/CVE-2024-29018 advisory
- https://github.com/advisories/GHSA-mq39-4gv4-mvpx advisory
- https://github.com/moby/moby url