CVE-2024-23653
moby/buildkit: Buildkit's interactive containers API does not validate entitlements check
Severity by source
Trivy's own label is CRITICAL. Rated critical by NVD, GHSA, Azure Linux, CBL-Mariner. Rated lower by Red Hat (high), Amazon (high), Bottlerocket (high), Ubuntu (medium).
Description
BuildKit is a toolkit for converting source code to build artifacts in an efficient, expressive and repeatable manner. In addition to running containers as build steps, BuildKit also provides APIs for running interactive containers based on built images. It was possible to use these APIs to ask BuildKit to run a container with elevated privileges. Normally, running such containers is only allowed if special `security.insecure` entitlement is enabled both by buildkitd configuration and allowed by the user initializing the build request. The issue has been fixed in v0.12.5 . Avoid using BuildKit frontends from untrusted sources.
Affected packages and fixed versions
| Source | Package | Fixed in |
|---|---|---|
| Azure Linux 3.0 | docker-buildx, docker-compose, moby-engine | 0:0.14.0-1.azl3 and 2 more |
| CBL-Mariner 2.0 | moby-buildx, moby-cli, moby-compose and 1 more | 0:0.7.1-18.cm2 and 2 more |
| go::GitHub Security Advisory Go | github.com/moby/buildkit | 0.12.5 |
| alpine 3.18 | docker | 25.0.2-r0 |
| alpine 3.19 | buildkit, docker, singularity | 0.12.5-r0 and 2 more |
| alpine 3.20 | buildkit, docker, podman and 1 more | 0.12.5-r0 and 3 more |
| alpine 3.21 | buildkit, docker, podman and 1 more | 0.12.5-r0 and 3 more |
| alpine 3.22 | buildkit, docker, podman and 1 more | 0.12.5-r0 and 3 more |
| alpine 3.23 | buildkit, docker, podman and 1 more | 0.12.5-r0 and 3 more |
| alpine 3.24 | buildkit, docker, podman and 1 more | 0.12.5-r0 and 3 more |
| alpine edge | buildkit, docker, podman and 1 more | 0.12.5-r0 and 3 more |
| amazon linux 2023 | docker, docker-debuginfo, docker-debugsource | 25.0.3-1.amzn2023.0.1 |
Show all 72 entries from 23 sources
| Source | Package | Fixed in |
|---|---|---|
| Azure Linux 3.0 | docker-buildx | 0:0.14.0-1.azl3 |
| Azure Linux 3.0 | docker-compose | 0:2.27.0-1.azl3 |
| Azure Linux 3.0 | moby-engine | 0:25.0.3-1.azl3 |
| CBL-Mariner 2.0 | moby-buildx | 0:0.7.1-18.cm2 |
| CBL-Mariner 2.0 | moby-cli | 0:20.10.27-3.cm2 |
| CBL-Mariner 2.0 | moby-compose | 0:2.17.2-7.cm2 |
| CBL-Mariner 2.0 | moby-engine | 0:20.10.27-3.cm2 |
| go::GitHub Security Advisory Go | github.com/moby/buildkit | 0.12.5 |
| alpine 3.18 | docker | 25.0.2-r0 |
| alpine 3.19 | buildkit | 0.12.5-r0 |
| alpine 3.19 | docker | 25.0.2-r0 |
| alpine 3.19 | singularity | 4.1.1-r0 |
| alpine 3.20 | buildkit | 0.12.5-r0 |
| alpine 3.20 | docker | 25.0.2-r0 |
| alpine 3.20 | podman | 4.9.2-r0 |
| alpine 3.20 | singularity | 4.1.1-r0 |
| alpine 3.21 | buildkit | 0.12.5-r0 |
| alpine 3.21 | docker | 25.0.2-r0 |
| alpine 3.21 | podman | 4.9.2-r0 |
| alpine 3.21 | singularity | 4.1.1-r0 |
| alpine 3.22 | buildkit | 0.12.5-r0 |
| alpine 3.22 | docker | 25.0.2-r0 |
| alpine 3.22 | podman | 4.9.2-r0 |
| alpine 3.22 | singularity | 4.1.1-r0 |
| alpine 3.23 | buildkit | 0.12.5-r0 |
| alpine 3.23 | docker | 25.0.2-r0 |
| alpine 3.23 | podman | 4.9.2-r0 |
| alpine 3.23 | singularity | 4.1.1-r0 |
| alpine 3.24 | buildkit | 0.12.5-r0 |
| alpine 3.24 | docker | 25.0.2-r0 |
| alpine 3.24 | podman | 4.9.2-r0 |
| alpine 3.24 | singularity | 4.1.1-r0 |
| alpine edge | buildkit | 0.12.5-r0 |
| alpine edge | docker | 25.0.2-r0 |
| alpine edge | podman | 4.9.2-r0 |
| alpine edge | singularity | 4.1.1-r0 |
| amazon linux 2023 | docker | 25.0.3-1.amzn2023.0.1 |
| amazon linux 2023 | docker-debuginfo | 25.0.3-1.amzn2023.0.1 |
| amazon linux 2023 | docker-debugsource | 25.0.3-1.amzn2023.0.1 |
| bottlerocket | docker-engine | 1.19.1-c325a08b |
| chainguard | buildkitd | 0.12.5-r0 |
| chainguard | conftest | 0.49.0-r1 |
| chainguard | conftest-fips | 0.48.0-r2 |
| chainguard | docker | 25.0.2-r0 |
| chainguard | guac | 0.4.0-r1 |
| chainguard | kaniko | 1.20.1-r0 |
| chainguard | kubescape | 3.0.3-r7 |
| chainguard | scorecard | 4.13.1-r4 |
| chainguard | skaffold | 2.11.0-r0 |
| chainguard | trivy | 0.49.0-r1 |
| chainguard | zot | 2.0.1-r2 |
| rapidfort amazon linux 2023 | docker | 25.0.3-1.amzn2023.0.1 |
| rapidfort ubuntu 20.04 | docker.io | 0:26.1.5+dfsg1-9ubuntu1 |
| rapidfort ubuntu 22.04 | docker.io | 0:26.1.5+dfsg1-9ubuntu1 |
| rapidfort ubuntu 24.04 | docker.io | 0:26.1.5+dfsg1-9ubuntu1 |
| ubuntu 18.04-ESM | docker.io | no fix listed |
| ubuntu 20.04-ESM | docker.io | no fix listed |
| ubuntu 20.04-ESM | docker.io-app | 26.1.3-0ubuntu1~20.04.1+esm1 |
| ubuntu 22.04 | docker.io | no fix listed |
| ubuntu 22.04 | docker.io-app | 27.5.1-0ubuntu3~22.04.2 |
| ubuntu 24.04 | docker.io | no fix listed |
| ubuntu 24.04 | docker.io-app | 27.5.1-0ubuntu3~24.04.2 |
| wolfi | buildkitd | 0.12.5-r0 |
| wolfi | conftest | 0.49.0-r1 |
| wolfi | docker | 25.0.2-r0 |
| wolfi | guac | 0.4.0-r1 |
| wolfi | kaniko | 1.20.1-r0 |
| wolfi | kubescape | 3.0.3-r7 |
| wolfi | scorecard | 4.13.1-r4 |
| wolfi | skaffold | 2.11.0-r0 |
| wolfi | trivy | 0.49.0-r1 |
| wolfi | zot | 2.0.1-r2 |
References
- http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2024-23653
- https://access.redhat.com/security/cve/CVE-2024-23653
- https://github.com/bottlerocket-os/bottlerocket/security/advisories/GHSA-qwf2-877f-3qc6
- https://github.com/moby/buildkit
- https://github.com/moby/buildkit/commit/5026d95aa3336e97cfe46e3764f52d08bac7a10e
- https://github.com/moby/buildkit/commit/92cc595cfb12891d4b3ae476e067c74250e4b71e
- https://github.com/moby/buildkit/pull/4602
- https://github.com/moby/buildkit/releases/tag/v0.12.5