Bug 2262352 (CVE-2024-24557) - CVE-2024-24557 moby: classic builder cache poisoning
Summary: CVE-2024-24557 moby: classic builder cache poisoning
Keywords:
Status: NEW
Alias: CVE-2024-24557
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 2262353 2262354
Blocks: 2262351
TreeView+ depends on / blocked
 
Reported: 2024-02-02 01:00 UTC by Patrick Del Bello
Modified: 2024-04-02 21:21 UTC (History)
16 users (show)

Fixed In Version: moby 25.0.2, moby 24.0.9
Doc Type: ---
Doc Text:
A vulnerability was found in github.com/moby/moby. The classic builder cache system in moby is vulnerable to cache poisoning if the image is built using a 'FROM scratch' in Dockerfile. This flaw allows an attacker who has knowledge of the Dockerfile to create a malicious cache that would be pulled and considered a valid cache candidate for some build steps. This only affects one if using DOCKER_BUILDKIT=0 or using the /build API endpoint.
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description Patrick Del Bello 2024-02-02 01:00:26 UTC
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.

https://github.com/moby/moby/commit/3e230cfdcc989dc524882f6579f9e0dac77400ae
https://github.com/moby/moby/security/advisories/GHSA-xw73-rw38-6vjc


Note You need to log in before you can comment on or make changes to this bug.