GitHub Advisoryadvisory · Go

GHSA-4vrq-3vrq-g6gg BuildKit Git URL subdir component can cause access to restricted files

HIGH Published 2026-03-26 Modified 2026-04-24 Official page ↗
Aliases
CVE-2026-33748
Ecosystem
Go
Packages
github.com/moby/buildkit
Severity
High
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
Weaknesses
CWE-22, CWE-59
Reviewed
2026-03-26

Affected packages

• Go github.com/moby/buildkit: < 0.28.1 → fixed in 0.28.1

Description

Impact Insufficient validation of Git URL fragment subdir components (`#:`, docs) may allow access to files outside the checked-out Git repository root. Possible access is limited to files on the same mounted filesystem. Patches The issue has been fixed in version v0.28.1 Workarounds The 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.

Related

Alias · CVE (1)

  • CVE-2026-33748 BuildKit is a toolkit for converting source code to build artifacts in an efficient, expressive and repeatable manner. vulnerability

Weakness · CWE (2)

  • CWE-22 Improper Limitation of a Pathname to a Restricted Directory weakness
  • CWE-59 Improper Link Resolution Before File Access weakness

References