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

High 8.2 Published Updated

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

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

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, CWE-22

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.

PackageAffectedFixed in
github.com/moby/buildkit GoAll versions0.28.1
github.com/moby/buildkit GoAll versions0.28.1
github.com/moby/buildkit GoAll versions0.28.1

Products include Mobyproject Buildkit.

How do I fix CVE-2026-33748?

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

Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.

Is CVE-2026-33748 being exploited?

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

Sources

Also known as BELL-CVE-2026-33748, CLEANSTART-2026-BN78541, CLEANSTART-2026-CI85082, CLEANSTART-2026-HI94719, CLEANSTART-2026-ZT40995, DEBIAN-CVE-2026-33748 and 29 more.

Is CVE-2026-33748 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free