# CVE-2026-33748: BuildKit Git URL subdir component can cause access to restricted files

> Attackers can access restricted files outside the Git repository root via malicious Git URL subdir components in BuildKit builds.

- **Severity:** High 8.2 (`CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 27 Mar 2026
- **Updated:** 27 Mar 2026
- **Also known as:** BELL-CVE-2026-33748, CLEANSTART-2026-BN78541, CLEANSTART-2026-CI85082, CLEANSTART-2026-HI94719, CLEANSTART-2026-ZT40995, DEBIAN-CVE-2026-33748, ECHO-e637-7f37-6dcd, GHSA-4vrq-3vrq-g6gg, GO-2026-4859, MINI-2632-pq86-pgg7, MINI-349m-f7vc-7qjp, MINI-3jhq-67c9-p6j7, MINI-489c-498j-69hj, MINI-5799-m9mg-whw9, MINI-5j26-grqg-jqgp, MINI-5wf2-rq2r-8f4r, MINI-6q34-72g5-rq2m, MINI-7m4f-q72w-4wp5, MINI-7mcx-6m94-g28c, MINI-7v2m-vxv7-8whh, MINI-825w-pgq5-995m, MINI-82xv-w59w-jph2, MINI-mcq6-3952-6jpc, MINI-mg87-p9c2-4cq2, MINI-p5x7-r77h-989c, MINI-q247-j46h-2xrh, MINI-qcmq-6rh2-vwvg, MINI-qmqv-26fq-gwh2, MINI-qvcq-q7x6-h9j3, MINI-r8vh-rv9q-jhj5, MINI-vcqw-6833-q283, MINI-vqgm-rf2h-4hpw, MINI-vx5g-xqqw-25g6, MINI-x8x6-f6c5-7vgw, ROOT-APP-GOBINARY-CVE-2026-33748

## What is CVE-2026-33748?

CVE-2026-33748 is a high-severity path traversal vulnerability in moby buildkit, published on 27 Mar 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

BuildKit is a toolkit for converting source code to build artifacts in an efficient, expressive and repeatable manner. Prior to version 0.28.1, insufficient validation of Git URL fragment subdir components may allow access to files outside the checked-out Git repository root. Possible access is limited to files on the same mounted filesystem. The issue has been fixed in version v0.28.1 The issue affects only builds that use Git URLs with a subpath component. As a workaround, avoid building Dockerfiles from untrusted sources or using the subdir component from an untrusted Git repository where the subdir component could point to a symlink.

Weakness: CWE-59 (Improper Link Resolution Before File Access), CWE-22 (Improper Limitation of a Pathname to a Restricted Directory)

## Which versions are affected by CVE-2026-33748?

3 open source packages ship an affected version, including github.com/moby/buildkit. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/moby/buildkit` | Go | All versions | 0.28.1 |
| `github.com/moby/buildkit` | Go | All versions | 0.28.1 |
| `github.com/moby/buildkit` | Go | All versions | 0.28.1 |

Products: Mobyproject Buildkit.

## How do I fix CVE-2026-33748?

Upgrade github.com/moby/buildkit to 0.28.1 or later.

## Is CVE-2026-33748 being exploited?

There is no known exploitation of CVE-2026-33748 in the wild and no public exploit code.

## Other vulnerabilities in moby buildkit

- [CVE-2024-23652](https://insights.sbomify.com/CVE-2024-23652/): BuildKit possible host system access from mount stub cleaner (critical 10.0)
- [CVE-2024-23653](https://insights.sbomify.com/CVE-2024-23653/): BuildKit interactive containers API does not validate entitlements check (critical 9.8)
- [CVE-2024-23651](https://insights.sbomify.com/CVE-2024-23651/): BuildKit possible race condition with accessing subpaths from cache mounts (high 8.7)
- [CVE-2026-33747](https://insights.sbomify.com/CVE-2026-33747/): BuildKit vulnerable to malicious frontend causing file escape outside of storage root (high 8.4)
- [CVE-2026-15789](https://insights.sbomify.com/CVE-2026-15789/): Malicious client can bypass destination directory validation on local sources upload (medium 6.9)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-33748 and fix it if it is affected.

What it is: CVE-2026-33748 is a high-severity path traversal vulnerability in moby buildkit, published on 27 Mar 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2026-33748 in the wild and no public exploit code.

Affected packages and fixed versions:
- github.com/moby/buildkit (Go): affected all versions; fixed in 0.28.1
- github.com/moby/buildkit (Go): affected all versions; fixed in 0.28.1
- github.com/moby/buildkit (Go): affected all versions; fixed in 0.28.1

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-33748/ (Markdown: https://insights.sbomify.com/CVE-2026-33748/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-33748
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-33748
- OSV: https://osv.dev/vulnerability/CVE-2026-33748

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-33748/
Summaries are generated and may contain mistakes; the official description above is the record.
