CVE-2026-33748
Docker vulnerability analysis and mitigation

Overview

CVE-2026-33748 is a path traversal and symlink-following vulnerability in Moby BuildKit, a toolkit for converting source code to build artifacts. Insufficient validation of Git URL fragment subdir components (the #: syntax) may allow access to files outside the checked-out Git repository root, limited to files on the same mounted filesystem. It affects all BuildKit versions prior to 0.28.1 and was published on March 25, 2026, with a patch released the same day. The vulnerability carries a CVSS v3.1 score of 7.5 (High) and a CVSS v4.0 score of 8.2 (High) (GitHub Advisory, BuildKit Advisory).

Technical details

The root cause is improper validation of the subdir fragment component in Git URLs used as Docker build contexts (CWE-22: Path Traversal; CWE-59: Improper Link Resolution Before File Access). When a Git URL with a #:<subdir> fragment is supplied to BuildKit, the subdir value is not sufficiently sanitized, allowing it to reference a symlink that resolves to a path outside the repository root. An attacker controlling the Git repository (or supplying a malicious Git URL) can craft a subdir component pointing to a symlink that escapes the repository boundary, causing BuildKit to access arbitrary files on the same mounted filesystem. No authentication or user interaction is required, and attack complexity is low, though the attack requires specific deployment conditions (a build using Git URLs with subdir components from an untrusted source) (GitHub Advisory, BuildKit Advisory).

Impact

Successful exploitation allows an attacker to read arbitrary files accessible on the same mounted filesystem as the BuildKit build environment, with a high confidentiality impact and no integrity or availability impact. Sensitive data at risk includes credentials, API keys, configuration files, and other secrets present on the host filesystem that would not normally be accessible through a Git build context. The scope is limited to the mounted filesystem, reducing but not eliminating the risk of broader lateral movement (GitHub Advisory, Feedly).

Exploitability

As of the time of publication, there is no public proof-of-concept exploit and no evidence of in-the-wild exploitation (Feedly). The EPSS score is approximately 0.017–0.032%, placing it in the lower percentiles for near-term exploitation likelihood. The vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog. No threat actor attribution has been reported. Detection coverage is available via Nessus and Qualys scanners (Feedly).

Exploitation steps

  1. Identify a target: Locate a CI/CD pipeline or build environment using BuildKit versions prior to 0.28.1 that accepts Git URLs with #:<subdir> fragment components from external or untrusted sources.
  2. Prepare a malicious Git repository: Create or control a Git repository that contains a symlink in a directory (e.g., malicious-subdir/) pointing to a sensitive path outside the repository root, such as /etc/ or a secrets directory on the host filesystem.
  3. Craft a malicious Git URL: Construct a Docker build context URL using the #:<subdir> fragment syntax pointing to the symlink-containing directory, e.g., https://attacker.example.com/repo.git#:malicious-subdir.
  4. Trigger a build: Supply this URL to a BuildKit-powered build (e.g., via docker build or a CI pipeline that accepts user-supplied build contexts).
  5. Exfiltrate files: BuildKit, failing to properly validate the subdir component, follows the symlink and exposes files outside the repository root during the build process, allowing the attacker to read sensitive files from the host filesystem (GitHub Advisory, BuildKit Advisory).

Indicators of compromise

  • Build Logs: Docker or BuildKit build logs referencing Git URLs containing #: fragment components pointing to unusual or unexpected subdirectories.
  • File System: Presence of symlinks in Git repository subdirectories that resolve to paths outside the repository root (e.g., pointing to /etc/, /var/, or credential directories).
  • Network: Outbound connections from the build host to unexpected or attacker-controlled Git repositories during build operations.
  • Process: BuildKit daemon (buildkitd) accessing files outside the expected build context or repository directory, observable via filesystem audit logs (e.g., auditd or inotifywait events on sensitive paths).

Mitigation and workarounds

Upgrade BuildKit to version v0.28.1 or later, which contains the fix for insufficient validation of Git URL fragment subdir components (BuildKit Release). As a workaround for environments that cannot immediately upgrade, avoid building Dockerfiles from untrusted Git sources and do not use the #:<subdir> URL fragment component with repositories where the subdir value could be attacker-controlled or point to a symlink (GitHub Advisory). Downstream distributions including Red Hat (RHSA-2026:9440, RHSA-2026:9453, RHSA-2026:10125), Ubuntu (USN-8230-1), SUSE (SUSE-SU-2026:2120-1), openSUSE, and Amazon Linux have also released updated packages incorporating the fix.

Community reactions

The advisory was published by maintainer tonistiigi on March 25, 2026, alongside the v0.28.1 release, which also addressed a second vulnerability (GHSA-4c29-8rgm-jvjj) related to untrusted custom frontends (BuildKit Release). Multiple Linux distributions (Red Hat, Ubuntu, SUSE, openSUSE, Amazon Linux) issued security advisories and updated packages in the weeks following disclosure, indicating broad ecosystem attention. Security scanner vendors including Tenable (Nessus) and Qualys added detection coverage shortly after the advisory was published.

Additional resources

Linux Distribution fix status

Fix availability across major Linux distributions and their releases.

Debian

Fixed

bookworm

docker.io

Affected

sid

docker.io: 28.5.2+dfsg4-3

Fixed

trixie

docker.io: 26.1.5+dfsg1-9+deb13u1

Fixed

Ubuntu

Fixed

bionic (esm-apps)

docker.io

Affected

devel

docker.io

Affected

focal (esm-apps)

docker.io

Affected

jammy

docker.io

Affected

jammy (esm-apps)

docker.io

Affected

noble

docker.io

Affected

noble (esm-apps)

docker.io

Affected

resolute

docker.io

Affected

RHEL / CentOS

Fixed

OpenShift

el9:odf4/cephcsi-rhel9-0:v4.20.17

Fixed

RHEL 10

Not Affected

Alpine

Fixed

edge

buildkit: 0.29.0-r0, 29.3.1-r0

Fixed

v3.23

docker: 29.3.1-r0

Fixed

SourceThis report was generated using AI

Related Docker vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-78662HIGH7.5
  • Docker logoDocker
  • kubescape-server-fips
NoYesSep 02, 2026
CVE-2026-56855HIGH7.5
  • Docker logoDocker
  • fulcio-fips
NoYesSep 02, 2026
CVE-2026-75593HIGH7.2
  • Docker logoDocker
  • ubi10::buildah
NoYesAug 19, 2026
CVE-2026-61711MEDIUM5.3
  • Docker logoDocker
  • podman-fips-6.0
NoYesAug 19, 2026
CVE-2026-61712LOW2.3
  • Docker logoDocker
  • kubescape-ksserver
NoYesAug 19, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management