CVE-2023-26054 Credentials inlined to Git URLs could end up in provenance attestation in BuildKit
Attackers with access to build provenance attestations can view credentials embedded in Git URLs used during the build process.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2023-26054?
CVE-2023-26054 is a medium-severity vulnerability in moby buildkit, published on 6 Mar 2023. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Official description
BuildKit is a toolkit for converting source code to build artifacts in an efficient, expressive and repeatable manner. In affected versions when the user sends a build request that contains a Git URL that contains credentials and the build creates a provenance attestation describing that build, these credentials could be visible from the provenance attestation. Git URL can be passed in two ways: 1) Invoking build directly from a URL with credentials. 2) If the client sends additional version control system (VCS) info hint parameters on builds from a local source. Usually, that would mean reading the origin URL from `.git/config` file. When a build is performed under specific conditions where credentials were passed to BuildKit they may be visible to everyone who has access to provenance attestation. Provenance attestations and VCS info hints were added in version v0.11.0. Previous versions are not vulnerable. In v0.10, when building directly from Git URL, the same URL could be visible in `BuildInfo` structure that is a predecessor of Provenance attestations. Previous versions are not vulnerable. This bug has been fixed in v0.11.4. Users are advised to upgrade. Users unable to upgrade may disable VCS info hints by setting `BUILDX_GIT_INFO=0`. `buildctl` does not set VCS hints based on `.git` directory, and values would need to be passed manually with `--opt`.
Weakness: CWE-200
Which versions are affected by CVE-2023-26054?
2 open source packages ship an affected version, including github.com/moby/buildkit. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
github.com/moby/buildkit Go | From 0.10.0 | 0.11.4 |
github.com/moby/buildkit Go | From 0.10.0 | 0.11.4 |
Products include Mobyproject Buildkit.
How do I fix CVE-2023-26054?
Upgrade github.com/moby/buildkit to 0.11.4 or later.
Is CVE-2023-26054 being exploited?
There is no known exploitation of CVE-2023-26054 in the wild and no public exploit code.
Other vulnerabilities in moby buildkit
- CVE-2024-23652 BuildKit possible host system access from mount stub cleaner
- CVE-2024-23653 BuildKit interactive containers API does not validate entitlements check
- CVE-2024-23651 BuildKit possible race condition with accessing subpaths from cache mounts
- CVE-2026-33747 BuildKit vulnerable to malicious frontend causing file escape outside of storage root
- CVE-2026-33748 BuildKit Git URL subdir component can cause access to restricted files
Sources
Also known as CLEANSTART-2026-GE40868, GHSA-gc89-7gcr-jxqc.