{"id":"CVE-2024-24557","aliases":["ALPINE-CVE-2024-24557","AZL-34275","AZL-35002","BELL-CVE-2024-24557","DEBIAN-CVE-2024-24557","EUVD-2024-0773","GHSA-xw73-rw38-6vjc","GO-2024-2512","OESA-2024-1302","UBUNTU-CVE-2024-24557","openSUSE-SU-2024:14287-1"],"status":"published","title":"Moby classic builder cache poisoning","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.","severity":{"version":"3.1","score":6.9,"vector":"CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:C/C:L/I:H/A:L","level":"medium","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-11","score":0.0026,"percentile":0.17921,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-345","CWE-346"],"published":"2024-02-01T16:26:29Z","modified":"2026-11-03T06:32:06Z","fixes":[{"ecosystem":"Go","package":"github.com/docker/docker","fixed_in":["25.0.2","24.0.9","24.0.9+incompatible","25.0.2+incompatible"],"sources":["ghsa","osv"]},{"ecosystem":"Go","package":"github.com/moby/moby","fixed_in":["24.0.9","25.0.2","24.0.9+incompatible","25.0.2+incompatible"],"sources":["ghsa","osv"]},{"ecosystem":"Alpine:v3.18","package":"docker","fixed_in":["25.0.2-r0"],"sources":["osv"]},{"ecosystem":"Alpine:v3.19","package":"docker","fixed_in":["25.0.2-r0"],"sources":["osv"]},{"ecosystem":"Alpine:v3.20","package":"docker","fixed_in":["25.0.2-r0"],"sources":["osv"]},{"ecosystem":"Alpine:v3.21","package":"docker","fixed_in":["25.0.2-r0"],"sources":["osv"]},{"ecosystem":"Alpine:v3.22","package":"docker","fixed_in":["25.0.2-r0"],"sources":["osv"]},{"ecosystem":"Alpine:v3.23","package":"docker","fixed_in":["25.0.2-r0"],"sources":["osv"]},{"ecosystem":"Alpine:v3.24","package":"docker","fixed_in":["25.0.2-r0"],"sources":["osv"]},{"ecosystem":"Azure Linux:2","package":"moby-engine","fixed_in":["20.10.27-3"],"sources":["osv"]},{"ecosystem":"Azure Linux:3","package":"moby-engine","fixed_in":["25.0.3-1"],"sources":["osv"]},{"ecosystem":"Alpaquita:stream","package":"docker","fixed_in":["25.0.2-r0"],"sources":["osv"]},{"ecosystem":"Debian:13","package":"docker.io","fixed_in":["26.1.4+dfsg1-9"],"sources":["osv"]},{"ecosystem":"Debian:14","package":"docker.io","fixed_in":["26.1.4+dfsg1-9"],"sources":["osv"]},{"ecosystem":"openEuler:20.03-LTS-SP1","package":"docker","fixed_in":["engine-18.09.0-263.oe1"],"sources":["osv"]},{"ecosystem":"openEuler:20.03-LTS-SP4","package":"docker","fixed_in":["engine-18.09.0-263.oe2003sp4"],"sources":["osv"]},{"ecosystem":"openEuler:22.03-LTS","package":"docker","fixed_in":["engine-18.09.0-334.oe2203sp3"],"sources":["osv"]},{"ecosystem":"openEuler:22.03-LTS-SP1","package":"docker","fixed_in":["engine-18.09.0-333.oe2203sp1"],"sources":["osv"]},{"ecosystem":"openEuler:22.03-LTS-SP2","package":"docker","fixed_in":["engine-18.09.0-333.oe2203sp2"],"sources":["osv"]},{"ecosystem":"openEuler:22.03-LTS-SP3","package":"docker","fixed_in":["engine-18.09.0-334.oe2203sp3"],"sources":["osv"]},{"ecosystem":"Ubuntu:Pro:20.04:LTS","package":"docker.io-app","fixed_in":["26.1.3-0ubuntu1~20.04.1+esm1"],"sources":["osv"]},{"ecosystem":"Ubuntu:22.04:LTS","package":"docker.io-app","fixed_in":["27.5.1-0ubuntu3~22.04.2"],"sources":["osv"]},{"ecosystem":"Ubuntu:24.04:LTS","package":"docker.io-app","fixed_in":["27.5.1-0ubuntu3~24.04.2"],"sources":["osv"]},{"ecosystem":"openSUSE:Tumbleweed","package":"forgejo-runner","fixed_in":["3.5.1-1.1"],"sources":["osv"]}],"affected":[{"source":"ghsa","ecosystem":"Go","package":"github.com/docker/docker","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"25.0.0"},{"fixed":"25.0.2"}]}]},{"source":"ghsa","ecosystem":"Go","package":"github.com/docker/docker","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"24.0.9"}]}]},{"source":"ghsa","ecosystem":"Go","package":"github.com/moby/moby","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"24.0.9"}]}]},{"source":"ghsa","ecosystem":"Go","package":"github.com/moby/moby","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"25.0.0"},{"fixed":"25.0.2"}]}]},{"source":"osv","ecosystem":"Alpine:v3.18","package":"docker","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"25.0.2-r0"}]}]},{"source":"osv","ecosystem":"Alpine:v3.19","package":"docker","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"25.0.2-r0"}]}]},{"source":"osv","ecosystem":"Alpine:v3.20","package":"docker","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"25.0.2-r0"}]}]},{"source":"osv","ecosystem":"Alpine:v3.21","package":"docker","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"25.0.2-r0"}]}]},{"source":"osv","ecosystem":"Alpine:v3.22","package":"docker","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"25.0.2-r0"}]}]},{"source":"osv","ecosystem":"Alpine:v3.23","package":"docker","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"25.0.2-r0"}]}]},{"source":"osv","ecosystem":"Alpine:v3.24","package":"docker","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"25.0.2-r0"}]}]},{"source":"osv","ecosystem":"Azure Linux:2","package":"moby-engine","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"20.10.27-3"}]}]},{"source":"osv","ecosystem":"Azure Linux:3","package":"moby-engine","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"25.0.3-1"}]}]},{"source":"osv","ecosystem":"Alpaquita:23","package":"docker","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"20.10.21-r1"}]}]},{"source":"osv","ecosystem":"Alpaquita:stream","package":"docker","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"24.0.2-r0"},{"fixed":"25.0.2-r0"}]}]},{"source":"osv","ecosystem":"Debian:12","package":"docker.io","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["20.10.24+dfsg1-1","20.10.24+dfsg1-1+deb12u1","20.10.25+dfsg1-1","20.10.25+dfsg1-2","20.10.25+dfsg1-3","20.10.25+dfsg1-4","26.1.4+dfsg1-1","26.1.4+dfsg1-2","26.1.4+dfsg1-3","26.1.4+dfsg1-4","26.1.4+dfsg1-5","26.1.4+dfsg1-6","26.1.4+dfsg1-7","26.1.4+dfsg1-8","26.1.4+dfsg1-9","26.1.4+dfsg2-1","26.1.4+dfsg3-1","26.1.5+dfsg1-1","26.1.5+dfsg1-10","26.1.5+dfsg1-2","26.1.5+dfsg1-3","26.1.5+dfsg1-4","26.1.5+dfsg1-5","26.1.5+dfsg1-6","26.1.5+dfsg1-7","26.1.5+dfsg1-8","26.1.5+dfsg1-9","27.5.1+dfsg1-1","27.5.1+dfsg1-2","27.5.1+dfsg2-1","27.5.1+dfsg3-1","27.5.1+dfsg3-2","27.5.1+dfsg3-3","27.5.1+dfsg3-4","27.5.1+dfsg3-5","27.5.1+dfsg3-6","27.5.1+dfsg4-1","27.5.1+dfsg4-2","28.5.2+dfsg1-1","28.5.2+dfsg2-1","28.5.2+dfsg3-1","28.5.2+dfsg3-2","28.5.2+dfsg4-1","28.5.2+dfsg4-2","28.5.2+dfsg4-3","28.5.2+dfsg4-4","28.5.2+dfsg4-5"]},{"source":"osv","ecosystem":"Debian:13","package":"docker.io","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"26.1.4+dfsg1-9"}]}]},{"source":"osv","ecosystem":"Debian:14","package":"docker.io","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"26.1.4+dfsg1-9"}]}]},{"source":"osv","ecosystem":"Go","package":"github.com/docker/docker","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"24.0.9"}]}]},{"source":"osv","ecosystem":"Go","package":"github.com/moby/moby","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"24.0.9"}]}]},{"source":"osv","ecosystem":"Go","package":"github.com/moby/moby","ranges":[{"type":"SEMVER","events":[{"introduced":"25.0.0"},{"fixed":"25.0.2"}]}]},{"source":"osv","ecosystem":"Go","package":"github.com/docker/docker","ranges":[{"type":"SEMVER","events":[{"introduced":"25.0.0"},{"fixed":"25.0.2"}]}]},{"source":"osv","ecosystem":"Go","package":"github.com/docker/docker","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"24.0.9+incompatible"},{"introduced":"25.0.0+incompatible"},{"fixed":"25.0.2+incompatible"}]}]},{"source":"osv","ecosystem":"Go","package":"github.com/moby/moby","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"24.0.9+incompatible"},{"introduced":"25.0.0+incompatible"},{"fixed":"25.0.2+incompatible"}]}]},{"source":"osv","ecosystem":"openEuler:20.03-LTS-SP1","package":"docker","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"engine-18.09.0-263.oe1"}]}]},{"source":"osv","ecosystem":"openEuler:20.03-LTS-SP4","package":"docker","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"engine-18.09.0-263.oe2003sp4"}]}]},{"source":"osv","ecosystem":"openEuler:22.03-LTS","package":"docker","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"engine-18.09.0-334.oe2203sp3"}]}]},{"source":"osv","ecosystem":"openEuler:22.03-LTS-SP1","package":"docker","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"engine-18.09.0-333.oe2203sp1"}]}]},{"source":"osv","ecosystem":"openEuler:22.03-LTS-SP2","package":"docker","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"engine-18.09.0-333.oe2203sp2"}]}]},{"source":"osv","ecosystem":"openEuler:22.03-LTS-SP3","package":"docker","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"engine-18.09.0-334.oe2203sp3"}]}]},{"source":"osv","ecosystem":"Ubuntu:Pro:18.04:LTS","package":"docker.io","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.13.1-0ubuntu6","17.03.2-0ubuntu1","17.03.2-0ubuntu3","17.03.2-0ubuntu5","17.12.1-0ubuntu1","18.06.1-0ubuntu1~18.04.1","18.06.1-0ubuntu1.2~18.04.1","18.09.2-0ubuntu1~18.04.1","18.09.5-0ubuntu1~18.04.2","18.09.7-0ubuntu1~18.04.1","18.09.7-0ubuntu1~18.04.3","18.09.7-0ubuntu1~18.04.4","19.03.6-0ubuntu1~18.04.1","19.03.6-0ubuntu1~18.04.2","19.03.6-0ubuntu1~18.04.3","20.10.2-0ubuntu1~18.04.2","20.10.2-0ubuntu1~18.04.3","20.10.7-0ubuntu1~18.04.1","20.10.7-0ubuntu1~18.04.2","20.10.7-0ubuntu5~18.04.2","20.10.7-0ubuntu5~18.04.3","20.10.12-0ubuntu2~18.04.1","20.10.21-0ubuntu1~18.04.2","20.10.21-0ubuntu1~18.04.3","20.10.21-0ubuntu1~18.04.3+esm1","20.10.21-0ubuntu1~18.04.3+esm2","20.10.21-0ubuntu1~18.04.3+esm3"]},{"source":"osv","ecosystem":"Ubuntu:Pro:20.04:LTS","package":"docker.io","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["19.03.2-0ubuntu1","19.03.6-0ubuntu1","19.03.8-0ubuntu1","19.03.8-0ubuntu1.20.04","19.03.8-0ubuntu1.20.04.1","19.03.8-0ubuntu1.20.04.2","20.10.2-0ubuntu1~20.04.2","20.10.2-0ubuntu1~20.04.3","20.10.7-0ubuntu1~20.04.1","20.10.7-0ubuntu1~20.04.2","20.10.7-0ubuntu5~20.04.1","20.10.7-0ubuntu5~20.04.2","20.10.12-0ubuntu2~20.04.1","20.10.21-0ubuntu1~20.04.1","20.10.21-0ubuntu1~20.04.2","20.10.21-0ubuntu1~20.04.4","20.10.21-0ubuntu1~20.04.5","20.10.21-0ubuntu1~20.04.6","20.10.21-0ubuntu1~20.04.6+esm1","20.10.21-0ubuntu1~20.04.6+esm2"]},{"source":"osv","ecosystem":"Ubuntu:Pro:20.04:LTS","package":"docker.io-app","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"26.1.3-0ubuntu1~20.04.1+esm1"}]}],"versions":["20.10.25-0ubuntu1~20.04.1","20.10.25-0ubuntu1~20.04.2","24.0.5-0ubuntu1~20.04.1","24.0.7-0ubuntu2~20.04.1","26.1.3-0ubuntu1~20.04.1"]},{"source":"osv","ecosystem":"Ubuntu:22.04:LTS","package":"docker.io-app","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"27.5.1-0ubuntu3~22.04.2"}]}],"versions":["20.10.25-0ubuntu1~22.04.1","20.10.25-0ubuntu1~22.04.2","24.0.5-0ubuntu1~22.04.1","24.0.7-0ubuntu2~22.04.1","26.1.3-0ubuntu1~22.04.1","27.5.1-0ubuntu3~22.04.1"]},{"source":"osv","ecosystem":"Ubuntu:Pro:22.04:LTS","package":"docker.io","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["20.10.7-0ubuntu5","20.10.7-0ubuntu7","20.10.12-0ubuntu1","20.10.12-0ubuntu2","20.10.12-0ubuntu3","20.10.12-0ubuntu3+gke1.24.1","20.10.12-0ubuntu4","20.10.21-0ubuntu1~22.04.2","20.10.21-0ubuntu1~22.04.3","20.10.21-0ubuntu1~22.04.5","20.10.21-0ubuntu1~22.04.6","20.10.21-0ubuntu1~22.04.7","20.10.21-0ubuntu1~22.04.7+esm1","20.10.21-0ubuntu1~22.04.7+esm2","20.10.21-0ubuntu1~22.04.8","20.10.21-0ubuntu1~22.04.8+esm1"]},{"source":"osv","ecosystem":"Ubuntu:24.04:LTS","package":"docker.io-app","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"27.5.1-0ubuntu3~24.04.2"}]}],"versions":["24.0.5-0ubuntu1","24.0.7-0ubuntu1","24.0.7-0ubuntu2","24.0.7-0ubuntu3","24.0.7-0ubuntu4","24.0.7-0ubuntu4.1","26.1.3-0ubuntu1~24.04.1","27.5.1-0ubuntu3~24.04.1"]},{"source":"osv","ecosystem":"Ubuntu:Pro:24.04:LTS","package":"docker.io","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["20.10.24+dfsg1-1ubuntu2","20.10.25+dfsg1-2ubuntu1","20.10.25+dfsg1-2ubuntu1+esm1","20.10.25+dfsg1-2ubuntu1+esm2","20.10.25+dfsg1-2ubuntu1.24.04.1","20.10.25+dfsg1-2ubuntu1.24.04.1+esm1"]},{"source":"osv","ecosystem":"Ubuntu:25.10","package":"docker.io","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["26.1.5+dfsg1-9ubuntu1"]},{"source":"osv","ecosystem":"Ubuntu:26.10","package":"docker.io","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["27.5.1+dfsg4-2ubuntu1","28.5.2+dfsg4-5ubuntu1"]},{"source":"osv","ecosystem":"Ubuntu:26.04:LTS","package":"docker.io","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["26.1.5+dfsg1-9ubuntu1","27.5.1+dfsg4-1ubuntu1","27.5.1+dfsg4-2ubuntu1"]},{"source":"osv","ecosystem":"openSUSE:Tumbleweed","package":"forgejo-runner","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"3.5.1-1.1"}]}]}],"products":[{"vendor":"moby","product":"moby"},{"vendor":"mobyproject","product":"moby"}],"references":[{"url":"https://github.com/moby/moby/security/advisories/GHSA-xw73-rw38-6vjc","tags":["x_refsource_CONFIRM","x_transferred","Vendor Advisory","advisory","web","report"]},{"url":"https://github.com/moby/moby/commit/3e230cfdcc989dc524882f6579f9e0dac77400ae","tags":["x_refsource_MISC","x_transferred","Patch","fix","web","report"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-24557","tags":["web","advisory"]},{"url":"https://github.com/moby/moby/commit/fca702de7f71362c8d103073c7e4a1d0a467fadd","tags":["web","fix"]},{"url":"https://github.com/moby/moby/commit/fce6e0ca9bc000888de3daa157af14fa41fcd0ff","tags":["web","fix"]},{"url":"https://github.com/advisories/GHSA-xw73-rw38-6vjc"},{"url":"https://security.alpinelinux.org/vuln/CVE-2024-24557","tags":["advisory"]},{"url":"https://docs.bell-sw.com/security/cves/CVE-2024-24557","tags":["advisory"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/24xxx/CVE-2024-24557.json","tags":["advisory"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2024-24557","tags":["advisory"]},{"url":"https://github.com/moby/moby","tags":["package"]},{"url":"https://www.openeuler.org/en/security/safety-bulletin/detail.html?id=openEuler-SA-2024-1302","tags":["advisory"]},{"url":"https://ubuntu.com/security/CVE-2024-24557","tags":["report"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2024-24557","tags":["report"]},{"url":"","tags":["advisory"]},{"url":"https://www.suse.com/security/cve/CVE-2024-24557","tags":["web"]}],"sources":{"cve":[{"id":"CVE-2024-24557","title":"Moby classic builder cache poisoning","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.","status":"published","published":"2024-02-01T16:26:29.685Z","modified":"2025-05-15T15:27:27.082Z","cvss":[{"version":"3.1","score":6.9,"vector":"CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:C/C:L/I:H/A:L","level":"medium","assessor":"cna"}],"cwes":["CWE-346","CWE-345"],"updated_at":"2026-11-02T14:34:13.64024Z"}],"euvd":[{"id":"EUVD-2024-0773","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.","status":"published","published":"2024-02-01T16:26:29Z","modified":"2025-05-15T15:27:27Z","cvss":[{"version":"3.1","score":6.9,"vector":"CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:C/C:L/I:H/A:L","level":"medium"}],"updated_at":"2026-11-02T20:32:46.52057Z"}],"ghsa":[{"id":"GHSA-xw73-rw38-6vjc","title":"Classic builder cache poisoning","description":"The classic builder cache system is prone to cache poisoning if the image is built `FROM scratch`.\nAlso, changes to some instructions (most important being `HEALTHCHECK` and `ONBUILD`) would not cause a cache miss.\n\n\nAn 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.\n\nFor example, an attacker could create an image that is considered as a valid cache candidate for:\n```\nFROM scratch\nMAINTAINER Pawel\n```\n\nwhen in fact the malicious image used as a cache would be an image built from a different Dockerfile.\n\nIn the second case, the attacker could for example substitute a different `HEALTCHECK` command.\n\n\n### Impact\n\n23.0+ users are only affected if they explicitly opted out of Buildkit (`DOCKER_BUILDKIT=0` environment variable) or are using the `/build` API endpoint (which uses the classic builder by default).\n\nAll users on versions older than 23.0 could be impacted. An example could be a CI with a shared cache, or just a regular Docker user pulling a malicious image due to misspelling/typosquatting.\n\nImage build API endpoint (`/build`) and `ImageBuild` function from `github.com/docker/docker/client` is also affected as it the uses classic builder by default. \n\n\n### Patches\n\nPatches are included in Moby releases:\n\n- v25.0.2\n- v24.0.9\n- v23.0.10\n\n### Workarounds\n\n- Use `--no-cache` or use Buildkit if possible (`DOCKER_BUILDKIT=1`, it's default on 23.0+ assuming that the buildx plugin is installed).\n- Use `Version = types.BuilderBuildKit` or `NoCache = true` in `ImageBuildOptions` for `ImageBuild` call.\n\n","status":"published","published":"2024-02-01T20:51:19Z","modified":"2024-07-05T18:59:06Z","cvss":[{"version":"3.1","score":6.9,"vector":"CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:C/C:L/I:H/A:L","level":"medium"}],"cwes":["CWE-345","CWE-346"],"updated_at":"2026-11-02T14:37:55.455438Z"}],"nvd":[{"id":"CVE-2024-24557","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.","status":"published","published":"2024-02-01T17:15:10.953Z","modified":"2026-06-17T07:14:36.123Z","cvss":[{"version":"3.1","score":6.9,"vector":"CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:C/C:L/I:H/A:L","level":"medium","assessor":"secondary"},{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","level":"high","assessor":"primary"}],"cwes":["CWE-345","CWE-346"],"updated_at":"2026-11-02T14:09:34.891666Z"}],"osv":[{"id":"ALPINE-CVE-2024-24557","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.","status":"published","published":"2024-02-01T17:15:10.953Z","modified":"2026-11-03T06:32:06.438379351Z","cvss":[{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","level":"high"}],"updated_at":"2026-11-03T07:18:15.355745Z"},{"id":"AZL-34275","title":"CVE-2024-24557 affecting package moby-engine for versions less than 20.10.27-3","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.","status":"published","published":"2024-02-01T17:15:10Z","modified":"2026-04-21T04:27:04.873863Z","cvss":[{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","level":"high"}],"updated_at":"2026-11-02T15:28:03.821827Z"},{"id":"AZL-35002","title":"CVE-2024-24557 affecting package moby-engine for versions less than 25.0.3-1","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.","status":"published","published":"2024-02-01T17:15:10Z","modified":"2026-04-21T04:34:05.526101Z","cvss":[{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","level":"high"}],"updated_at":"2026-11-02T15:28:03.821827Z"},{"id":"BELL-CVE-2024-24557","status":"published","published":"2024-02-03T05:59:11.749659Z","modified":"2026-01-26T09:42:51.606686Z","cvss":[{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","level":"high"}],"updated_at":"2026-11-02T15:28:19.288949Z"},{"id":"CVE-2024-24557","title":"Moby classic builder cache poisoning","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.","status":"published","published":"2024-02-01T16:26:29.685Z","modified":"2026-10-28T02:31:09.661236508Z","cvss":[{"version":"3.1","score":6.9,"vector":"CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:C/C:L/I:H/A:L","level":"medium"}],"cwes":["CWE-345","CWE-346"],"updated_at":"2026-11-02T15:44:38.897406Z"},{"id":"DEBIAN-CVE-2024-24557","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.","status":"published","published":"2024-02-01T17:15:10.953Z","modified":"2026-11-02T12:00:50.607686525Z","cvss":[{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","level":"high"}],"updated_at":"2026-11-02T15:45:41.849198Z"},{"id":"GHSA-xw73-rw38-6vjc","title":"Classic builder cache poisoning","description":"The classic builder cache system is prone to cache poisoning if the image is built `FROM scratch`.\nAlso, changes to some instructions (most important being `HEALTHCHECK` and `ONBUILD`) would not cause a cache miss.\n\n\nAn 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.\n\nFor example, an attacker could create an image that is considered as a valid cache candidate for:\n```\nFROM scratch\nMAINTAINER Pawel\n```\n\nwhen in fact the malicious image used as a cache would be an image built from a different Dockerfile.\n\nIn the second case, the attacker could for example substitute a different `HEALTCHECK` command.\n\n\n### Impact\n\n23.0+ users are only affected if they explicitly opted out of Buildkit (`DOCKER_BUILDKIT=0` environment variable) or are using the `/build` API endpoint (which uses the classic builder by default).\n\nAll users on versions older than 23.0 could be impacted. An example could be a CI with a shared cache, or just a regular Docker user pulling a malicious image due to misspelling/typosquatting.\n\nImage build API endpoint (`/build`) and `ImageBuild` function from `github.com/docker/docker/client` is also affected as it the uses classic builder by default. \n\n\n### Patches\n\nPatches are included in Moby releases:\n\n- v25.0.2\n- v24.0.9\n- v23.0.10\n\n### Workarounds\n\n- Use `--no-cache` or use Buildkit if possible (`DOCKER_BUILDKIT=1`, it's default on 23.0+ assuming that the buildx plugin is installed).\n- Use `Version = types.BuilderBuildKit` or `NoCache = true` in `ImageBuildOptions` for `ImageBuild` call.\n\n","status":"published","published":"2024-02-01T20:51:19Z","modified":"2026-09-10T03:50:00.315725311Z","cvss":[{"version":"3.1","score":6.9,"vector":"CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:C/C:L/I:H/A:L","level":"medium"}],"cwes":["CWE-345","CWE-346"],"updated_at":"2026-11-02T15:47:00.604718Z"},{"id":"OESA-2024-1302","title":"docker security update","description":"Docker is an open source project to build, ship and run any application as a lightweight container.\r\n\r\nSecurity Fix(es):\r\n\r\nMoby 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.(CVE-2024-24557)","status":"published","published":"2024-03-22T11:06:45Z","modified":"2026-08-18T01:18:19.633640467Z","cvss":[{"version":"3.1","score":6.9,"vector":"CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:C/C:L/I:H/A:L","level":"medium"}],"updated_at":"2026-11-02T15:52:40.71472Z"},{"id":"UBUNTU-CVE-2024-24557","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.","status":"published","published":"2024-02-01T17:15:00Z","modified":"2026-10-17T12:56:31.351211648Z","cvss":[{"version":"3.1","score":6.9,"vector":"CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:C/C:L/I:H/A:L","level":"medium"},{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","level":"high"}],"updated_at":"2026-11-02T16:54:42.68848Z"},{"id":"GO-2024-2512","title":"Classic builder cache poisoning in github.com/docker/docker","description":"Classic builder cache poisoning in github.com/docker/docker","status":"published","published":"2024-06-28T15:28:53Z","modified":"2026-02-04T04:11:30.933192Z","updated_at":"2026-11-02T15:47:01.185262Z"},{"id":"openSUSE-SU-2024:14287-1","title":"forgejo-runner-3.5.1-1.1 on GA media","description":"These are all security issues fixed in the forgejo-runner-3.5.1-1.1 package on the GA media of openSUSE Tumbleweed.","status":"published","published":"2024-08-25T00:00:00Z","modified":"2026-02-04T03:03:32.598875Z","updated_at":"2026-11-02T16:58:36.662953Z"}]}}
