Vulnerability · Published Jan 31, 2024 · Assigned by GitHub_M
CVE-2024-23653BuildKit interactive containers API does not validate entitlements check
Critical 9.8
In plain English
A critical-severity incorrect authorization in buildkit from moby. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 3.4% (higher than 89% of all known vulnerabilities). Ready-made attack tooling exists: public proof-of-concept code. Fixed versions are available - upgrade the affected package.
Official 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 & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine:v3.20 | buildkit | 0.12.5-r0 | ALPINE-CVE-2024-23653 |
| Alpine:v3.21 | buildkit | 0.12.5-r0 | ALPINE-CVE-2024-23653 |
| Alpine:v3.22 | buildkit | 0.12.5-r0 | ALPINE-CVE-2024-23653 |
| Alpine:v3.23 | buildkit | 0.12.5-r0 | ALPINE-CVE-2024-23653 |
| Alpine:v3.24 | buildkit | 0.12.5-r0 | ALPINE-CVE-2024-23653 |
| Alpine:v3.20 | docker | 25.0.2-r0 | ALPINE-CVE-2024-23653 |
| Alpine:v3.21 | docker | 25.0.2-r0 | ALPINE-CVE-2024-23653 |
| Alpine:v3.22 | docker | 25.0.2-r0 | ALPINE-CVE-2024-23653 |
| Alpine:v3.23 | docker | 25.0.2-r0 | ALPINE-CVE-2024-23653 |
| Alpine:v3.24 | docker | 25.0.2-r0 | ALPINE-CVE-2024-23653 |
| Alpine:v3.20 | podman | 4.9.2-r0 | ALPINE-CVE-2024-23653 |
| Alpine:v3.21 | podman | 4.9.2-r0 | ALPINE-CVE-2024-23653 |
| Alpine:v3.22 | podman | 4.9.2-r0 | ALPINE-CVE-2024-23653 |
| Alpine:v3.23 | podman | 4.9.2-r0 | ALPINE-CVE-2024-23653 |
| Alpine:v3.24 | podman | 4.9.2-r0 | ALPINE-CVE-2024-23653 |
| Alpine:v3.20 | singularity | 4.1.1-r0 | ALPINE-CVE-2024-23653 |
| Alpine:v3.21 | singularity | 4.1.1-r0 | ALPINE-CVE-2024-23653 |
| Alpine:v3.22 | singularity | 4.1.1-r0 | ALPINE-CVE-2024-23653 |
| Alpine:v3.23 | singularity | 4.1.1-r0 | ALPINE-CVE-2024-23653 |
| Alpine:v3.24 | singularity | 4.1.1-r0 | ALPINE-CVE-2024-23653 |
| Go | github.com/moby/buildkit | 0.12.5 | GHSA-wr6v-9f75-vh2g |
| Go | github.com/moby/buildkit | 0.12.5 | GO-2024-2497 |
| Ubuntu:22.04:LTS | docker.io-app | 27.5.1-0ubuntu3~22.04.2 | UBUNTU-CVE-2024-23653 |
| Ubuntu:24.04:LTS | docker.io-app | 27.5.1-0ubuntu3~24.04.2 | UBUNTU-CVE-2024-23653 |
Affected products (as reported)
Weakness: CWE-863 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
References
- https://github.com/moby/buildkit/security/advisories/GHSA-wr6v-9f75-vh2g x_refsource_CONFIRM
- https://github.com/moby/buildkit/pull/4602 x_refsource_MISC
- https://github.com/moby/buildkit/releases/tag/v0.12.5 x_refsource_MISC