Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2026-33747: CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in moby buildkit

0
High
VulnerabilityCVE-2026-33747cvecve-2026-33747cwe-22
Published: Fri Mar 27 2026 (03/27/2026, 00:49:06 UTC)
Source: CVE Database V5
Vendor/Project: moby
Product: buildkit

Description

CVE-2026-33747 is a high-severity path traversal vulnerability in moby buildkit versions prior to 0. 28. 1. It allows an attacker controlling a custom BuildKit frontend to write files outside the intended BuildKit state directory by crafting malicious API messages. Exploitation requires using untrusted frontends via the #syntax directive or the --build-arg BUILDKIT_SYNTAX option, but well-known frontends like docker/dockerfile are not affected. The vulnerability impacts confidentiality, integrity, and availability, as arbitrary file writes can lead to code execution or system compromise. No authentication or user interaction is required, but local access to configure the build frontend is necessary. The issue has been fixed in version 0. 28. 1.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 03/27/2026, 01:30:36 UTC

Technical Analysis

CVE-2026-33747 is a path traversal vulnerability classified under CWE-22 affecting moby buildkit, a toolkit used to convert source code into build artifacts efficiently. The flaw exists in versions prior to 0.28.1 and arises when a custom BuildKit frontend is used. Specifically, the frontend can craft API messages that cause files to be written outside the BuildKit state directory, which is intended to restrict file operations to a safe execution context. This improper limitation of pathname allows an attacker to escape the sandboxed directory and write arbitrary files anywhere on the host filesystem accessible to the build process. The vulnerability is triggered by specifying an untrusted frontend via the #syntax directive or the --build-arg BUILDKIT_SYNTAX build argument. Notably, using trusted and well-known frontends such as docker/dockerfile does not expose this vulnerability. The flaw does not require privileged access or user interaction, but it does require the ability to specify or influence the build frontend, which typically implies local or CI/CD pipeline access. The vulnerability has a CVSS v3.1 score of 8.4, reflecting its high impact on confidentiality, integrity, and availability. The vendor fixed the issue in buildkit version 0.28.1 by properly restricting file writes to the designated state directory, preventing path traversal attacks.

Potential Impact

The vulnerability allows attackers to write arbitrary files outside the intended build directory, potentially leading to arbitrary code execution, privilege escalation, or persistent compromise of the build environment. This can undermine the confidentiality of sensitive build artifacts or credentials, corrupt build outputs, and disrupt the availability of build services. Organizations relying on BuildKit for container image builds or other automated build pipelines that incorporate custom or untrusted frontends are at risk. Attackers with access to configure build frontends could leverage this flaw to implant malicious files or backdoors on build servers or CI/CD infrastructure. This risk extends to cloud environments, on-premises data centers, and developer workstations using vulnerable BuildKit versions. The absence of known exploits in the wild suggests limited current exploitation, but the high severity and ease of exploitation without authentication warrant immediate attention to prevent future attacks.

Mitigation Recommendations

1. Upgrade all BuildKit instances to version 0.28.1 or later, where the vulnerability is patched. 2. Restrict usage of custom BuildKit frontends; only allow trusted and verified frontend images such as docker/dockerfile. 3. Implement strict validation and whitelisting of build arguments, especially those that specify frontends (#syntax or BUILDKIT_SYNTAX). 4. Monitor build pipelines and logs for unusual file write operations or unexpected frontend usage. 5. Employ container runtime security policies to limit filesystem write permissions of build processes. 6. Isolate build environments to minimize the impact of potential compromise, using ephemeral containers or sandboxing. 7. Educate developers and DevOps teams about the risks of using untrusted frontends and enforce secure build practices. 8. Regularly audit build infrastructure for outdated BuildKit versions and unauthorized configuration changes.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
GitHub_M
Date Reserved
2026-03-23T18:30:14.124Z
Cvss Version
3.1
State
PUBLISHED

Threat ID: 69c5da053c064ed76f01c442

Added to database: 3/27/2026, 1:14:45 AM

Last enriched: 3/27/2026, 1:30:36 AM

Last updated: 3/27/2026, 2:27:28 AM

Views: 6

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses