{"id":"CVE-2026-33748","aliases":["GHSA-4vrq-3vrq-g6gg","GO-2026-4859"],"title":"BuildKit Git URL subdir component can cause access to restricted files","summary":"BuildKit Git URL subdir component can cause access to restricted files","severity":"high","cvss":7.5,"cvssVector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","vendor":"moby","product":"github.com/moby/buildkit","ecosystem":"go","affected":["github.com/moby/buildkit < 0.28.1"],"patched":["github.com/moby/buildkit 0.28.1"],"published":"2026-03-26","updated":"2026-09-10","sourceUpdated":"2026-09-10T03:50:59.724878717Z","source":"OSV","sourceUrl":"https://osv.dev/vulnerability/GHSA-4vrq-3vrq-g6gg","references":[{"url":"https://github.com/moby/buildkit/security/advisories/GHSA-4vrq-3vrq-g6gg"},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-33748"},{"url":"https://docs.docker.com/build/concepts/context/#url-fragments"},{"url":"https://github.com/moby/buildkit"},{"url":"https://github.com/moby/buildkit/releases/tag/v0.28.1"}],"tags":["osv","go"],"epss":0.00463,"epssPercentile":0.39278,"ingestedAt":"2026-09-12T03:13:01.754Z","slug":"CVE-2026-33748","body":"## Overview\n\n### 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.\n\n## Affected packages\n\n- `github.com/moby/buildkit < 0.28.1`\n\n## Remediation\n\nUpgrade to a patched release:\n\n- `github.com/moby/buildkit 0.28.1`","depth":"twilight","depthScore":41,"depthScoreParts":{"impact":41.3,"likelihood":0.1,"exploitation":0,"ransomware":0},"changes":[]}