{"id":"CVE-2026-33748","published":"2026-03-27T14:00:21Z","modified":"2026-03-27T19:58:28Z","title":"BuildKit Git URL subdir component can cause access to restricted files","vendor":"moby","product":"buildkit","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":8.2,"severity":"HIGH","version":"4.0","vector":"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","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00526,"percentile":0.45458,"provenance":"source"},"cwes":[{"id":"CWE-22","name":"Improper Limitation of a Pathname to a Restricted Directory"},{"id":"CWE-59","name":"Improper Link Resolution Before File Access"}],"references":[{"url":"https://github.com/moby/buildkit/security/advisories/GHSA-4vrq-3vrq-g6gg","tags":["x_refsource_CONFIRM"]},{"url":"https://docs.docker.com/build/concepts/context/#url-fragments","tags":["x_refsource_MISC"]},{"url":"https://github.com/moby/buildkit/releases/tag/v0.28.1","tags":["x_refsource_MISC"]}],"priority":{"score":14.8,"factors":[{"name":"EPSS percentile","points":9.09},{"name":"CVSS severity","points":5.74}]},"vendorSlug":"moby","affectedVersions":[{"vendor":"moby","product":"buildkit","versions":["< 0.28.1"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2026-03-27T18:55:58.658220Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"Go","package":"github.com/moby/buildkit","vulnerableRanges":["<0.28.1"],"patched":["0.28.1"],"from":["GHSA-4vrq-3vrq-g6gg","GO-2026-4859"],"provenance":"source"}],"summary":{"text":"BuildKit, the build toolkit from moby, contains a flaw in how the subdir component of Git URL fragments is validated, allowing paths to escape the checked-out repository root. An attacker who can supply a Git URL with a subpath to a build can read files outside the repository on the same mounted filesystem, with the risk raised when the subdir points to a symlink in an untrusted repository; the issue affects only builds that use a subpath component.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:35:16Z"},"euvd":{"id":"EUVD-2026-16618","exploited":false,"provenance":"source"}}