CVE-2026-33748: Github.com/moby/buildkit BuildKit Git URL Subdir Component Vulnerability
HIGHCVE-2026-33748 is a HIGH (CVSS 7.5) buildkit git url subdir component vulnerability (CWE-59: Improper Link Resolution Before File Access ('Link Following')) affecting Github.com/moby/buildkit libraries in the Go ecosystem. The issue involves buildkit git url subdir component can cause access to restricted files. Remediation is available by upgrading affected packages to version 0.28.1.
CVE-2026-33748 at a Glance
Security Impact
CVSS: 7.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N).
How to Fix CVE-2026-33748
To remediate this vulnerability, upgrade all affected Github.com/moby/buildkit dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade github.com/moby/buildkit to 0.28.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/moby/buildkit
How to Check if You Are Affected
To determine whether your application is affected by CVE-2026-33748, inspect your project dependencies for Github.com/moby/buildkit:
inspect dependencies for github.com/moby/buildkit
Analyze the terminal output to locate any version of Github.com/moby/buildkit in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.28.1), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-59: Improper Link Resolution Before File Access ('Link Following'), where the product attempts to access a file based on the filename, but it does not properly prevent that filename from identifying a link or shortcut that resolves to an unintended resource. In Github.com/moby/buildkit, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-33748 Affected Github.com/moby/buildkit Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/moby/buildkit
|
Go |
< 0.28.1
|
0.28.1
|
References
Frequently Asked Questions
What is CVE-2026-33748?
Which Github.com/moby/buildkit versions are affected?
What version fixes CVE-2026-33748?
Is github.com/moby/buildkit affected?
What is the CVSS score of CVE-2026-33748?
What CWE is associated with CVE-2026-33748?
How can I check Go dependencies for CVE-2026-33748?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-4vrq-3vrq-g6gg",
"modified" : "2026-04-24T20:58:22Z",
"published" : "2026-03-26T18:27:49Z",
"aliases" : [ "CVE-2026-33748" ],
"summary" : "BuildKit Git URL subdir component can cause access to restricted files",
"details" : "### Impact\nInsufficient validation of Git URL fragment subdir components (`<url>#<ref>:<subdir>`, [docs](https://docs.docker.com/build/concepts/context/#url-fragments)) may allow access to files outside the checked-out Git repository root. Possible access is limited to files on the same mounted filesystem.\n\n### Patches\nThe issue has been fixed in version v0.28.1\n\n### Workarounds\nThe issue affects only builds that use Git URLs with a subpath component. 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.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N"
}, {
"type" : "CVSS_V4",
"score" : "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"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/moby/buildkit"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.28.1"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/moby/buildkit/security/advisories/GHSA-4vrq-3vrq-g6gg"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-33748"
}, {
"type" : "WEB",
"url" : "https://docs.docker.com/build/concepts/context/#url-fragments"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/moby/buildkit"
}, {
"type" : "WEB",
"url" : "https://github.com/moby/buildkit/releases/tag/v0.28.1"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-22", "CWE-59" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-03-26T18:27:49Z",
"nvd_published_at" : "2026-03-27T15:16:57Z"
}
}