Ubuntu CVE Tracker
UBUNTU-CVE-2024-23652
Details
BuildKit is a toolkit for converting source code to build artifacts in an efficient, expressive and repeatable manner. A malicious BuildKit frontend or Dockerfile using RUN --mount could trick the feature that removes empty files created for the mountpoints into removing a file outside the container, from the host system. The issue has been fixed in v0.12.5. Workarounds include avoiding using BuildKit frontends from an untrusted source or building an untrusted Dockerfile containing RUN --mount feature.
Affected packages
| Ecosystem | Package | Affected versions |
|---|---|---|
| Ubuntu:Pro:16.04:LTS | docker.io | All versions, no fix listed |
| Ubuntu:Pro:18.04:LTS | docker.io | All versions before 20.10.21-0ubuntu1~18.04.3+esm3 (fixed in 20.10.21-0ubuntu1~18.04.3+esm3) |
| Ubuntu:Pro:20.04:LTS | docker.io | All versions before 20.10.21-0ubuntu1~20.04.6+esm2 (fixed in 20.10.21-0ubuntu1~20.04.6+esm2) |
| Ubuntu:Pro:20.04:LTS | docker.io-app | All versions before 26.1.3-0ubuntu1~20.04.1+esm1 (fixed in 26.1.3-0ubuntu1~20.04.1+esm1) |
| Ubuntu:22.04:LTS | docker.io-app | All versions before 27.5.1-0ubuntu3~22.04.2 (fixed in 27.5.1-0ubuntu3~22.04.2) |
| Ubuntu:Pro:22.04:LTS | docker.io | All versions before 20.10.21-0ubuntu1~22.04.7+esm2 (fixed in 20.10.21-0ubuntu1~22.04.7+esm2) |
| Ubuntu:24.04:LTS | docker.io-app | All versions before 27.5.1-0ubuntu3~24.04.2 (fixed in 27.5.1-0ubuntu3~24.04.2) |
| Ubuntu:Pro:24.04:LTS | docker.io | All versions before 20.10.25+dfsg1-2ubuntu1+esm2 (fixed in 20.10.25+dfsg1-2ubuntu1+esm2) |
References
- https://ubuntu.com/security/CVE-2024-23652
- https://github.com/moby/buildkit/security/advisories/GHSA-4v98-7qmw-rqr8
- https://github.com/moby/buildkit/pull/4603
- https://github.com/moby/buildkit/releases/tag/v0.12.5
- https://www.cve.org/CVERecord?id=CVE-2024-23652
- https://ubuntu.com/security/notices/USN-7474-1