CVE-2026-44517 in Buildahinfo

Summary

by MITRE • 08/22/2026

Buildah is a tool that facilitates building OCI images. From 1.38.1 until 1.43.2 and 1.44.0, TempDirForURL in define/types.go does not securely confine Git repository subdirectories to the downloaded build context, and downloadToDirectory and stdinToDirectory can follow a Dockerfile symlink left by a partially extracted tar archive. A malicious server supplying a Git repository or tar archive can cause files outside the build context directory to be included in the context or copied into the build. This issue is fixed in versions 1.43.2 and 1.44.0.

If you want to get best quality of vulnerability data, you may have to visit VulDB.

Analysis

by VulDB Data Team • 08/22/2026

The vulnerability identified within Buildah, specifically affecting versions from 1.38.1 through 1.43.2 and version 1.44.0, represents a critical failure in input validation and path confinement during the image building process. Buildah is widely utilized for constructing Open Container Initiative images, often integrating with CI/CD pipelines to automate container creation. The core of this flaw lies in how the tool handles external sources such as Git repositories and tar archives when preparing the build context. In a secure implementation, any files fetched from an external source must be strictly confined within a designated temporary directory that serves as the isolated build environment. However, due to insufficient path normalization and validation logic in the TempDirForURL function located in define/types.go, Buildah fails to properly restrict Git repository subdirectories to this safe boundary. This oversight allows for potential escape from the intended sandbox, creating an opportunity for unauthorized file inclusion or modification of files outside the build context directory.

The technical mechanism enabling this exploitation involves two primary vectors: handling of Git repositories and processing of tar archives containing symlinks. When Buildah downloads a Git repository to create a build context, it does not adequately sanitize paths that might traverse upwards using relative path components like dot-dot-slash sequences or resolve symbolic links in an unsafe manner. Similarly, the downloadToDirectory and stdinToDirectory functions are susceptible to following Dockerfile symlinks left behind by partially extracted tar archives. An attacker controlling a malicious Git repository or hosting a crafted tar archive can embed these dangerous paths or symlinks within the source material. When Buildah processes this input without proper validation, it interprets these references as valid locations within the build context rather than recognizing them as attempts to access arbitrary filesystem locations. This lack of strict confinement means that files located outside the intended temporary directory are inadvertently included in the build process.

The operational impact of this vulnerability is severe, particularly for organizations relying on automated image building pipelines. If a malicious server supplies a Git repository or tar archive containing these crafted paths, an attacker can cause Buildah to include sensitive configuration files, source code secrets, or other critical data from outside the build context into the resulting OCI image. This effectively breaks the isolation guarantees that container builds are supposed to provide. In practical terms, this could lead to the leakage of internal credentials, private keys, or proprietary intellectual property embedded in system directories that were never intended to be part of the application layer. Furthermore, if the build process involves subsequent steps such as copying files into a running container or deploying the image to production environments, the attacker may achieve remote code execution or privilege escalation by injecting malicious payloads via these improperly included files. This aligns with CWE-22 Improper Limitation of a Pathname to a Restricted Directory and CWE-59 Improper Link Resolution Before File Access, highlighting fundamental flaws in how external inputs are processed relative to file system boundaries.

From an adversary perspective, this vulnerability facilitates techniques associated with supply chain attacks where trusted tools are manipulated to exfiltrate data or inject malicious artifacts. It corresponds to ATT&CK technique T1059 Command and Scripting Interpreter if the included files trigger subsequent script execution, or more broadly to initial access vectors involving compromised build sources. The risk is amplified in environments that pull images from untrusted registries or use dynamic source references during builds without rigorous verification of upstream integrity. To mitigate this risk, organizations must immediately upgrade Buildah to version 1.43.2 or later where the path confinement logic has been corrected and symlinks are handled securely. Additionally, implementing strict policies around which sources can be used in build contexts, validating checksums of external archives before processing, and employing least-privilege principles for the user account running Buildah can further reduce exposure. Regular auditing of CI/CD pipeline configurations to ensure no reliance on untrusted or dynamically fetched source paths without verification is also recommended as a defense-in-depth measure against such path traversal vulnerabilities.

Responsible

GitHub M

Reservation

05/06/2026

Disclosure

08/22/2026

Moderation

accepted

CPE

ready

EPSS

0.00180

KEV

no

Activities

very low

Sources

Want to stay up to date on a daily basis?

Enable the mail alert feature now!