Vulnerability · Published Feb 1, 2024 · Assigned by GitHub_M

CVE-2024-24557Moby classic builder cache poisoning

Medium 6.9

In plain English

A medium-severity insufficient verification of data authenticity in moby from moby. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.3% (higher than 18% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)6.9Medium
Exploit odds (30 days)0.3%top 82.2% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

Official description

Moby is an open-source project created by Docker to enable software containerization. The classic builder cache system is prone to cache poisoning if the image is built FROM scratch. Also, changes to some instructions (most important being HEALTHCHECK and ONBUILD) would not cause a cache miss. An attacker with the knowledge of the Dockerfile someone is using could poison their cache by making them pull a specially crafted image that would be considered as a valid cache candidate for some build steps. 23.0+ users are only affected if they explicitly opted out of Buildkit (DOCKER_BUILDKIT=0 environment variable) or are using the /build API endpoint. All users on versions older than 23.0 could be impacted. Image build API endpoint (/build) and ImageBuild function from github.com/docker/docker/client is also affected as it the uses classic builder by default. Patches are included in 24.0.9 and 25.0.2 releases.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Alpine:v3.20docker25.0.2-r0ALPINE-CVE-2024-24557
Alpine:v3.21docker25.0.2-r0ALPINE-CVE-2024-24557
Alpine:v3.22docker25.0.2-r0ALPINE-CVE-2024-24557
Alpine:v3.23docker25.0.2-r0ALPINE-CVE-2024-24557
Alpine:v3.24docker25.0.2-r0ALPINE-CVE-2024-24557
Debian:12docker.iono fix listedDEBIAN-CVE-2024-24557
Debian:13docker.io26.1.4+dfsg1-9DEBIAN-CVE-2024-24557
Debian:14docker.io26.1.4+dfsg1-9DEBIAN-CVE-2024-24557
Gogithub.com/docker/docker24.0.9+incompatible, 25.0.2+incompatibleGO-2024-2512
Gogithub.com/docker/docker24.0.9GHSA-xw73-rw38-6vjc
Gogithub.com/docker/docker25.0.2GHSA-xw73-rw38-6vjc
Gogithub.com/moby/moby25.0.2GHSA-xw73-rw38-6vjc
Gogithub.com/moby/moby24.0.9GHSA-xw73-rw38-6vjc
Gogithub.com/moby/moby24.0.9+incompatible, 25.0.2+incompatibleGO-2024-2512
Ubuntu:25.10docker.iono fix listedUBUNTU-CVE-2024-24557
Ubuntu:26.04:LTSdocker.iono fix listedUBUNTU-CVE-2024-24557
Ubuntu:26.10docker.iono fix listedUBUNTU-CVE-2024-24557
Ubuntu:22.04:LTSdocker.io-app27.5.1-0ubuntu3~22.04.2UBUNTU-CVE-2024-24557
Ubuntu:24.04:LTSdocker.io-app27.5.1-0ubuntu3~24.04.2UBUNTU-CVE-2024-24557

Affected products (as reported)

VendorProductVersions
moby moby >= 25.0.0, < 25.0.2 < 24.0.9

Weakness: CWE-346, CWE-345 · Vector: CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:C/C:L/I:H/A:L

References